-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettings.java
More file actions
68 lines (47 loc) · 1.44 KB
/
Copy pathSettings.java
File metadata and controls
68 lines (47 loc) · 1.44 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import java.awt.FlowLayout;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.JTextField;
// Buttons don't work yet, will add event handling in future
public class Settings extends JFrame
{
/**
*
*/
private static final long serialVersionUID = 1L; // this was imported via Eclipse IDE, not sure what this means but I'll look it up
private JTextField information;
private JButton large;
private JButton medium;
private JButton small;
public Settings()
{
super("Settings");
setLayout ( new FlowLayout());
information = new JTextField("To view to game different size, "
+ "please press one of the following buttoms");
information.setEditable(false);
information.setBackground(Color.BLACK);
information.setForeground(Color.WHITE);
add(information, BorderLayout.NORTH);
small = new JButton("480 x 220p");
add(small, BorderLayout.CENTER);
large = new JButton("800 x 600p");
add(large, BorderLayout.CENTER);
medium = new JButton("600 x 410p");
add(medium, BorderLayout.CENTER);
SettingsHandler handler = new SettingsHandler();
small.addActionListener(handler);
large.addActionListener(handler);
medium.addActionListener(handler);
}
private class SettingsHandler implements ActionListener
{
public void actionPerformed(ActionEvent event)
{
}
}
}