FileDocCategorySizeDatePackage
WindowCloser.javaAPI DocExample725Sat Jan 13 18:05:38 GMT 2001com.darwinsys.util

WindowCloser

public class WindowCloser extends WindowAdapter
A WindowCloser - watch for Window Closing events, and follow them up with setVisible(false) and dispose().
author
Ian F. Darwin, ian@darwinsys.com
version
$Id: WindowCloser.java,v 1.3 2001/01/13 23:05:38 ian Exp $

Fields Summary
Window
win
The window we close
boolean
doExit
True 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 voidwindowClosing(java.awt.event.WindowEvent e)

		win.setVisible(false);
		win.dispose();
		if (doExit)
			System.exit(0);