Invoked when a window is changed from a minimized to a normal state. Invoked when a window is changed from a normal to a minimized state. Invoked the first time a window is made visible. Well, if you care only about the windowClosing Event, that is a real bother because you have to define all the other methods also. AWT compensates for this problem by providing Adapter classes.
Adapters are classes which offer default implementation of all the methods.
It is a concrete class, so you can just extend it and redefine the ones you are interested in, as below import java.awt. The problem here is that we have to have a separate class to handle events. We don t really have to create a new class at all, as shown below. This is where anonymous inner classes really come in handy. Key Events Key Events follow the same pattern as the window events import java.awt.