WindowCloserpublic class WindowCloser extends WindowAdapter A WindowCloser - watch for Window Closing events, and
follow them up with setVisible(false) and dispose(). |
Fields Summary |
---|
Window | winThe window we close | boolean | doExitTrue if we are to exit as well. |
Constructors Summary |
---|
public WindowCloser(Window w)
this(w, false);
| public WindowCloser(Window w, boolean exit)
win = w;
doExit = exit;
|
Methods Summary |
---|
public void | windowClosing(java.awt.event.WindowEvent e)
win.setVisible(false);
win.dispose();
if (doExit)
System.exit(0);
|
|