// Stuart Reges // 8/27/99 // grader: self // // Class CloseableFrame provides a variant of JFrame that includes // a window listener that closes the window and exits the // current application when the user selects the close button. import java.awt.*; import java.awt.event.*; public class CloseableFrame extends Frame { public CloseableFrame() { addWindowListener( new WindowAdapter() { public void windowClosing( WindowEvent e ) { System.exit(0); } }); } }