Advertisement
ipwxy

Untitled

Feb 27th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. import javax.swing.JButton;
  2. import javax.swing.JFrame;
  3. import javax.swing.JLabel;
  4.  
  5. public class Main {
  6.     public static void main(String[] args) {
  7.         JFrame frame = new JFrame("Frame");
  8.         JButton button = new JButton("Click me!");
  9.         JLabel label = new JLabel("Hello!");
  10.         frame.setSize(500, 200);
  11.         button.setBounds(100, 100, 250, 50);
  12.         frame.add(button);
  13.         //frame.add(label);
  14.         frame.setVisible(true);
  15.  
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement