Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TestClass{
- private MyButton button;
- public static void main(String[] args) {
- new TestClass().foo();
- }
- public void foo() {
- JFrame frame = new JFrame();
- JPanel panel = new JPanel();
- button = new MyButton("Button");
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.add(panel);
- panel.add(button);
- frame.pack();
- frame.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement