Java.awt : Contains all of the classes for creating user interfaces and for painting graphics and images.
Frame class : A
Frame is a top-level window with a title and a border.
WindowListener Interface: The listener interface for receiving window events. The class that is interested in processing a window event either implements this interface (and all the methods it contains) or extends the abstract
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.
Paint function() : This method will be invoked when it is time to paint. This method will be executed by the painting subsystem whenever you component needs to be rendered. Its signature is:
- public void paint(Graphics g)