Java Reference
In-Depth Information
The WindowListener interface
Defines methods to respond to events reflecting changes in the state of a window.
Defined Methods
Description
windowOpened(WindowEvent e)
Called the first time the window is opened.
windowClosing(WindowEvent e)
Called when the system menu Close item or
the window close icon is selected.
windowClosed(WindowEvent e)
Called when the window has been closed.
windowActivated(WindowEvent e)
Called when the window is activated - by
clicking on it, for example.
windowDeactivated(WindowEvent e)
Called when a window is deactivated - by
clicking on another window, for example.
windowIconified(WindowEvent e)
Called when a window is minimized and
reduced to an icon.
windowDeiconified(WindowEvent e)
Called when a window is restored from an
icon.
The WindowFocusListener interface
Defines methods to respond to a window gaining or losing the focus. When a window has the focus, one
of its child components can receive input from the keyboard. When it loses the focus, keyboard input
via a child component of the window is not possible.
Defined Methods
Description
windowGainedFocus(WindowEvent e)
Called when the window gains the focus such
that the window or one of its components will
receive keyboard events.
windowLostFocus( WindowEvent e)
Called when the window loses the focus. After
this event, neither the window nor any of its
components will receive keyboard events.
The WindowStateListener interface
Defines a method to respond to any change in the state of a window.
Defined Methods
Description
windowStateChanged( Window
Event e)
Called when the window state changes - when
it is maximized or iconified for example.
Search WWH ::




Custom Search