utilities
Class WindowCloser

java.lang.Object
  |
  +--java.awt.event.WindowAdapter
        |
        +--utilities.WindowCloser

public class WindowCloser
extends java.awt.event.WindowAdapter

Just handle WINDOW_CLOSING events. The constructor's argument determines whether to exit the program when the window is closed.


Constructor Summary
WindowCloser()
          Exit when the window is closed.
WindowCloser(boolean exitOnClose)
          Exit when the window is closed if the argument is true.
 
Method Summary
 void windowClosing(java.awt.event.WindowEvent e)
          A WINDOW_CLOSING event has been received.
 
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowCloser

public WindowCloser()
Exit when the window is closed.

WindowCloser

public WindowCloser(boolean exitOnClose)
Exit when the window is closed if the argument is true. Otherwise, just free the window's resources.
Method Detail

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
A WINDOW_CLOSING event has been received. Take the appropriate action, disposing of this window's resources.
Overrides:
windowClosing in class java.awt.event.WindowAdapter