aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/testsuite/java.sun.awt/FrameTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/testsuite/java.sun.awt/FrameTest.java')
-rw-r--r--libjava/classpath/testsuite/java.sun.awt/FrameTest.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/libjava/classpath/testsuite/java.sun.awt/FrameTest.java b/libjava/classpath/testsuite/java.sun.awt/FrameTest.java
new file mode 100644
index 0000000..02a2bef
--- /dev/null
+++ b/libjava/classpath/testsuite/java.sun.awt/FrameTest.java
@@ -0,0 +1,32 @@
+import java.awt.*;
+import java.awt.event.*;
+
+public class FrameTest
+ extends Frame
+{
+ public static void main(String args[])
+ {
+ FrameTest frame = new FrameTest();
+ frame.pack();
+ frame.show();
+ }
+ public FrameTest()
+ {
+ super("FrameTest");
+ Button done = new Button("Press to continue");
+ add(done, "Center");
+ addWindowListener(new WindowAdapter() {
+ public void windowClosing(WindowEvent event)
+ {
+ dispose();
+ System.exit(0);
+ }
+ });
+ done.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent ev) {
+ dispose();
+ System.exit(0);
+ }});
+
+ }
+}