Guest User

Untitled

a guest
Jan 30th, 2016
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1. package javaapplication4;
  2.  
  3. import java.awt.FlowLayout;
  4. import javax.swing.JButton;
  5. import javax.swing.JFrame;
  6. import javax.swing.JLabel;
  7.  
  8. public class JavaApplication4 extends JFrame{
  9.  
  10.     JButton b;
  11.     JLabel l;
  12.  
  13.     public JavaApplication4(){
  14.         this.setTitle("netbeans");
  15.         this.setSize(300, 300);
  16.         this.setVisible(true);
  17.         this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  18.         this.setLayout(new FlowLayout());
  19.         this.setResizable(false);
  20.         b = new JButton("we");
  21.         l = new JLabel("ff");
  22.         this.getContentPane().add(l);
  23.         this.getContentPane().add(b);
  24.     }
  25.  
  26.     public static void main(String[] args) {
  27.         JavaApplication4 f = new JavaApplication4();
  28.         f.setVisible(true);
  29.     }
  30. }
Add Comment
Please, Sign In to add comment