Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available. Like the window listener, the internal frame listener listens for events that occur when the "window" has been shown for the first time, disposed of, iconified, deiconified, activated, or deactivated. Before using an internal frame listener, please familiarize yourself with the WindowListener interface in How to Write Window Listeners. The application shown in the following figure demonstrates internal frame events. The application listens for internal frame events from the Event Generator frame, displaying a message that describes each event.
Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1. Please see XMLEncoder. Fields inherited from class java. String paramString Returns a parameter string identifying this event. Methods inherited from class java.
Herong Yang. This section provides a tutorial example on how to use javax. JInternalFameListener interfacethat allows implementing classes to handle internal frame events.
All three handle WindowEvent s. The methods in all three event handlers are implemented by the abstract WindowAdapter class. When the appropriate listener has been registered on a window such as a frame or dialog , window events are fired just after the window is opened, closed, iconified , deiconified, activated, deactivated, maximized, or restored to normal, or gains or loses the focus. Opening a window means showing it for the first time; closing it means removing the window from the screen.