// A class that extends WindowAdapter and exits when its window is closed.
// Barry Cornelius, 20 June 2000
import java.awt.       Window;
import java.awt.event. WindowAdapter;
import java.awt.event. WindowEvent;
public class ExitWindowAdapter extends WindowAdapter
{
   public void windowClosing(final WindowEvent pWindowEvent)
   {
      final Window tWindow = pWindowEvent.getWindow();
      tWindow.setVisible(false);
      tWindow.dispose();
      System.exit(0);
   }
}
