Advertisement
emmit

FAbio formulario 2

Aug 27th, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import javax.swing.*;
  3. import java.awt.*;
  4.  
  5. public class Form extends JFrame
  6. {
  7.         JLabel lb_titulo;
  8.         JButton bt_cadastro;
  9.         JTextField tf_nome;
  10.         JButton bt_sair;
  11.  
  12. public  Form()
  13. {      
  14.                 setTitle("ProRat");
  15.                 setSize(600, 400);
  16.                 setLocation(70, 70);
  17.                 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  18.                 setResizable(false);
  19.                 getContentPane().setBackground(new Color(10, 140, 120));
  20.                
  21.                
  22.                
  23.                 lb_titulo = new JLabel("Aula POO");
  24.                 bt_cadastro = new JButton("Cadastro");
  25.                 tf_nome = new JTextField("");
  26.                 bt_sair = new JButton("dada");
  27.                
  28.                 getContentPane().add(lb_titulo);
  29.                 getContentPane().add(bt_cadastro);
  30.                 getContentPane().add(tf_nome);
  31.                
  32.                 getContentPane().add("North",lb_titulo);
  33.                 getContentPane().add("South",bt_cadastro);
  34.                 getContentPane().add("North",tf_nome);
  35.                 getContentPane().add("South",bt_sair);
  36.                
  37.                
  38.         }      
  39.        
  40.         public static void main(String[] args) {
  41.                 Form obj_form = new Form();
  42.                
  43.                 obj_form.show();
  44.                
  45.                
  46.  
  47.         }
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement