// // WindowControlDispose.java // // 05-05-2002 Bikle // A WindowAdapter class that only disposes of the window // when the window closing gadget is pressed. // This class does not shutdown application. // Imports // ///////////////// import java.awt.*; import java.awt.event.*; import javax.swing.*; // //////////////////////////////////////////////////////// public class WindowControlDispose extends WindowAdapter { // //////////////////////////////////////////////////////// // Declarations // ///////////////// // no Declarations here // Constructors // ///////////////// WindowControlDispose () { // Empty Constructor } // Methods // ///////////////// public void windowClosing(WindowEvent event) { Window window = (Window)event.getSource(); window.dispose(); // I comment out the command below rather than removing it to help me remember // why this class is signicicant. // System.exit(0); } }