Java AWT | WindowStateListener
WindowStateListener is a part of java.awt.event package. It is an interface to handle window state events. This interface returns an event when the frame or window associated with it is iconified or maximized.
Abstract function of the class:
- windowStateChanged(WindowEvent e) : invoked when a state of the window is changed.
Below programs illustrate the WindowStateListener:
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.
- Java Program to handle window events
- Java Program to handle window events and identify them:
Note : The following program will not run in an online compiler please use an offline IDE