java.awt.event
Interface WindowListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster, BasicToolBarUI.FrameListener, JMenu.WinListener, WindowAdapter

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

Method Summary
 void windowActivated(WindowEvent event)
          This method is called when a window is activated.
 void windowClosed(WindowEvent event)
          This method is called when the window is closed.
 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.
 void windowDeactivated(WindowEvent event)
          This method is called when the window is deactivated.
 void windowDeiconified(WindowEvent event)
          This method is called when the window is deiconified.
 void windowIconified(WindowEvent event)
          This method is called when the window is iconified.
 void windowOpened(WindowEvent event)
          This method is called when the window is made visible.
 

Method Detail

windowOpened

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

Parameters:
event - the WindowEvent indicating the change

windowClosing

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

windowClosed

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

Parameters:
event - the WindowEvent indicating the dispose

windowIconified

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

Parameters:
event - the WindowEvent indicating the iconification
See Also:
Frame.setIconImage(Image)

windowDeiconified

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

Parameters:
event - the WindowEvent indicating the deiconification

windowActivated

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

windowDeactivated

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

Parameters:
event - the WindowEvent indicating the deactivation