Window Events

When the user manipulates the window, this action generates window events. Event listeners are registered for window events with Window method addWindowListener. The WindowListener interface provides seven window-event-handling methods—windowActivated (called when the user makes a window the active window), windowClosed (called after the window is closed), windowClosing (called when the user initiates closing of the window), windowDeactivated (called when the user makes another window the active window), windowDeiconified (called when the user restores a minimized window), windowIconified (called when the user minimizes a window) and windowOpened (called when a program first displays a window on the screen).

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.