-
Notifications
You must be signed in to change notification settings - Fork 0
/
Startmenü
105 lines (61 loc) · 1.8 KB
/
Startmenü
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class frame extends JFrame implements ActionListener {
/**
*
*/
private static final long serialVersionUID = 1L;
private JButton schliessen;
private JButton einstellung;
private JButton info;
private JButton ende;
public static void main(String[] args) {
frame frame = new frame("Menü");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 400);
frame.setLayout(null);
frame.setVisible(true);
}
public frame(String title) {
super(title);
schliessen = new JButton("Start");
schliessen.setBounds(120, 40, 160, 40);
schliessen.addActionListener(this);
add(schliessen);
einstellung = new JButton("Einstellungen");
einstellung.setBounds(120, 120, 160, 40);
einstellung.addActionListener(this);
add(einstellung);
info = new JButton("Credits");
info.setBounds(120, 200, 160, 40);
info.addActionListener(this);
add(info);
ende = new JButton("Ende");
ende.setBounds(120, 280, 160, 40);
ende.addActionListener(this);
add(ende);
}
public static void fenster(){
JFrame fenster = new JFrame();
fenster.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fenster.setSize(650,350);
fenster.setVisible(true);
}
public static void auswahl() {
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == schliessen ) {
}
if (e.getSource() == info ) {
Object[] options = { "OK"};
JOptionPane.showOptionDialog(null, "Programmiert von André ! ","Information", JOptionPane.DEFAULT_OPTION,JOptionPane.PLAIN_MESSAGE,null,options,options[0]);
}
if (e.getSource() == einstellung) {
auswahl();
}
if(e.getSource() == ende){
System.exit(0);
}
}
}