gcc/libjava/classpath/testsuite/java.sun.awt/FrameTest.java
Tom Tromey f911ba985a Initial revision
From-SVN: r102074
2005-07-16 00:30:23 +00:00

33 lines
663 B
Java

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);
}});
}
}