mirror of
https://github.com/2003scape/deep-c-rsc.git
synced 2024-03-22 05:49:51 -04:00
29 lines
902 B
Diff
29 lines
902 B
Diff
diff -ruN original/DrawTest.java modified/DrawTest.java
|
|
--- original/DrawTest.java 2008-11-10 23:31:58.000000000 +0400
|
|
+++ modified/DrawTest.java 2009-07-09 17:29:42.000000000 +0400
|
|
@@ -62,6 +62,11 @@
|
|
|
|
public static void main(String args[]) {
|
|
Frame f = new Frame("DrawTest");
|
|
+
|
|
+ f.addWindowListener(new WindowAdapter() {
|
|
+ public void windowClosing(WindowEvent e) { System.exit(0); }
|
|
+ });
|
|
+
|
|
DrawTest drawTest = new DrawTest();
|
|
drawTest.init();
|
|
drawTest.start();
|
|
@@ -194,6 +199,12 @@
|
|
DrawPanel target;
|
|
|
|
public DrawControls(DrawPanel target) {
|
|
+ Button button = new Button("Quit");
|
|
+ button.addActionListener(new ActionListener() {
|
|
+ public void actionPerformed(ActionEvent e) { System.exit(0); }
|
|
+ });
|
|
+ add(button);
|
|
+
|
|
this.target = target;
|
|
setLayout(new FlowLayout());
|
|
setBackground(Color.lightGray);
|