Advertisement
Guest User

Untitled

a guest
May 16th, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. public class TestClass{
  2.  
  3.     private MyButton button;
  4.  
  5.     public static void main(String[] args) {
  6.         new TestClass().foo();
  7.     }
  8.  
  9.     public void foo() {
  10.         JFrame frame = new JFrame();
  11.         JPanel panel = new JPanel();
  12.         button = new MyButton("Button");
  13.  
  14.         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  15.  
  16.         frame.add(panel);
  17.         panel.add(button);
  18.  
  19.         frame.pack();
  20.         frame.setVisible(true);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement