EventListener
AWTEventMulticaster
, BasicToolBarUI.FrameListener
, JMenu.WinListener
, WindowAdapter
public interface WindowListener extends EventListener
WindowAdapter
class (overriding only the methods of interest). The listener object created from that class is then registered with a Window using the window's addWindowListener
method. When the window's status changes by virtue of being opened, closed, activated or deactivated, iconified or deiconified, the relevant method in the listener object is invoked, and the WindowEvent
is passed to it.Modifier and Type | Method | Description |
---|---|---|
void |
windowActivated |
Invoked when the Window is set to be the active Window. |
void |
windowClosed |
Invoked when a window has been closed as the result of calling dispose on the window. |
void |
windowClosing |
Invoked when the user attempts to close the window from the window's system menu. |
void |
windowDeactivated |
Invoked when a Window is no longer the active Window. |
void |
windowDeiconified |
Invoked when a window is changed from a minimized to a normal state. |
void |
windowIconified |
Invoked when a window is changed from a normal to a minimized state. |
void |
windowOpened |
Invoked the first time a window is made visible. |
void windowOpened(WindowEvent e)
e
- the event to be processedvoid windowClosing(WindowEvent e)
e
- the event to be processedvoid windowClosed(WindowEvent e)
e
- the event to be processedvoid windowIconified(WindowEvent e)
e
- the event to be processedvoid windowDeiconified(WindowEvent e)
e
- the event to be processedvoid windowActivated(WindowEvent e)
e
- the event to be processedvoid windowDeactivated(WindowEvent e)
e
- the event to be processed
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/java/awt/event/WindowListener.html