Name: rm29839 Date: 04/09/98
=20
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.swing.JFrame;
class MainWindow extends JFrame
{
=09public MainWindow()
=09{
=09addWindowListener(new WindowAdapter() {
=09 public void windowClosing(WindowEvent e) {System.exit(0);}
=09});
=09}
}
public class jfcapp
{
=09public static void main(String[] args)
=09{
System.runFinalizersOnExit(true);
=09=09try
=09=09{
=09=09=09MainWindow window =3D new MainWindow();
=09=09=09window.setSize(400, 500);
=09=09=09window.setVisible(true);
=09=09}
=09=09catch (Exception e)
=09=09{
=09=09=09e.printStackTrace();
=09=09}
=09}
}
(Review ID: 27231)
======================================================================