Advertisement
emmit

FABIO FOrmulario

Aug 25th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  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.    
  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.         lb_titulo = new JLabel("Aula POO");
  22.         bt_cadastro = new JButton("Cadastro");
  23.         tf_nome = new JTextField("");
  24.         bt_sair - new
  25.        
  26.         getContentPane().add(lb_titulo);
  27.         getContentPane().add(bt_cadastro);
  28.         getContentPane().add(tf_nome);
  29.        
  30.        
  31.     }  
  32.    
  33.     public static void main(String[] args) {
  34.         Form obj_form = new Form();
  35.        
  36.         obj_form.show();
  37.        
  38.        
  39.  
  40.     }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement