blob: bbbb97cd79ddd73dcaf98a37bae65fe4116d3557 (
plain)
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
|
package eu.equalparts.cardbase.gui;
import java.awt.Button;
import java.awt.Frame;
import java.awt.Panel;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
@SuppressWarnings("serial")
public class CardbaseGUI extends Panel {
/**
* Run the GUI.
*
* @param args arguments passed down to {@code Application.launch()}.
*/
public static void main(String... args) {
Frame f = new Frame("Test");
CardbaseGUI c = new CardbaseGUI();
f.add(c);
f.pack();
f.addWindowListener(new WindowListener() {
@Override
public void windowOpened(WindowEvent e) {
// TODO Auto-generated method stub
}
@Override
public void windowIconified(WindowEvent e) {
// TODO Auto-generated method stub
}
@Override
public void windowDeiconified(WindowEvent e) {
// TODO Auto-generated method stub
}
@Override
public void windowDeactivated(WindowEvent e) {
// TODO Auto-generated method stub
}
@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
}
@Override
public void windowClosed(WindowEvent e) {
// TODO Auto-generated method stub
}
@Override
public void windowActivated(WindowEvent e) {
// TODO Auto-generated method stub
}
});
f.setVisible(true);
}
public void init() {
add(new Button("one"));
add(new Button("two"));
}
}
|