Class WindowMonitor

java.lang.Object
java.awt.event.WindowAdapter
noaa.coastwatch.gui.WindowMonitor
All Implemented Interfaces:
WindowFocusListener, WindowListener, WindowStateListener, EventListener

public class WindowMonitor extends WindowAdapter

The window monitor class performs a system exit when it receives the window closing event. This is generally only desirable if the closing window is the main application window.

As an example, the following code shows the window monitor being used for a frame:

   JFrame frame = new JFrame();
   frame.addWindowListener (new WindowMonitor());
 
Since:
3.1.2
Author:
Peter Hollemans