-
Notifications
You must be signed in to change notification settings - Fork 0
/
GUI.java
42 lines (30 loc) · 978 Bytes
/
GUI.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class GUI {
private static final int HEIGHT = 650;
private static final int WIDTH = 850;
public static void main(String[] args) {
JFrame hi = new JFrame("Darkness then redness then whiteness...");
hi.setSize(HEIGHT, WIDTH);
hi.setLocationRelativeTo(null);
hi.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
FlowLayout excuses = new FlowLayout();
hi.setLayout(excuses);
JButton initialButt = new JButton("Niki is cute");
JButton secondButt = new JButton("Spongeboy me bob");
JButton bensButt = new JButton("Push the BUTTon");
initialButt.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
System.out.println("Why are you pushing this?");
}
});
hi.add(initialButt);
hi.add(secondButt);
hi.add(bensButt);
hi.pack();
hi.setVisible(true);
}
}