OOP2

knopjes.java

1
/* This file is bloody bad written. GRASP's fucked, SOLID's absent and other stuff.
2
 */
3
import javax.swing.*;
4
5
class knopjes {
6
		public static void main(String[] args) {
7
				JFrame frame = new JFrame("Knoppentest");
8
				JPanel panel = new JPanel();
9
				frame.setContentPane(panel);
10
				frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
11
				//frame.setLayout(frame.getContentPane());
12
13
				JMenu menu = new JMenu();
14
				JButton knop = new JButton("Dit is de knop");
15
				
16
				panel.add(menu);
17
				panel.add(knop);
18
				frame.pack();
19
20
21
22
23
				frame.setVisible(true);
24
		}
25
}
26