java.awt.event

Interface WindowListener

public interface WindowListener extends EventListener

This interface is for classes that wish to monitor events for window changes. To watch a subset of these events, use a WindowAdapter.

Since: 1.1

See Also: WindowAdapter WindowEvent

UNKNOWN: updated to 1.4

Method Summary
voidwindowActivated(WindowEvent event)
This method is called when a window is activated.
voidwindowClosed(WindowEvent event)
This method is called when the window is closed.
voidwindowClosing(WindowEvent event)
This method is called when the user calls the system menu close function, giving the program a chance to cancel the close.
voidwindowDeactivated(WindowEvent event)
This method is called when the window is deactivated.
voidwindowDeiconified(WindowEvent event)
This method is called when the window is deiconified.
voidwindowIconified(WindowEvent event)
This method is called when the window is iconified.
voidwindowOpened(WindowEvent event)
This method is called when the window is made visible.

Method Detail

windowActivated

public void windowActivated(WindowEvent event)
This method is called when a window is activated. Only Frames and Dialogs can be active, and the active window always contains the component with focus.

Parameters: event the WindowEvent indicating the activation

windowClosed

public void windowClosed(WindowEvent event)
This method is called when the window is closed.

Parameters: event the WindowEvent indicating the dispose

windowClosing

public void windowClosing(WindowEvent event)
This method is called when the user calls the system menu close function, giving the program a chance to cancel the close.

Parameters: event the WindowEvent indicating the close attempt

windowDeactivated

public void windowDeactivated(WindowEvent event)
This method is called when the window is deactivated.

Parameters: event the WindowEvent indicating the deactivation

windowDeiconified

public void windowDeiconified(WindowEvent event)
This method is called when the window is deiconified.

Parameters: event the WindowEvent indicating the deiconification

windowIconified

public void windowIconified(WindowEvent event)
This method is called when the window is iconified.

Parameters: event the WindowEvent indicating the iconification

See Also: setIconImage

windowOpened

public void windowOpened(WindowEvent event)
This method is called when the window is made visible.

Parameters: event the WindowEvent indicating the change