Further methods and events for Windows
Important properties to set for frames:
- f.setTitle ( “This string will be on the title bar of the window”);
- (This method inherited from the Window class.)
- f.setSize ( 200, 500 );
- f.setLocation ( 100, 100 );
- (These methods inherited from the class Component.)
Window methods also include toBack(), toFront(), show(), which makes the window visible and in front, and hide(), which makes it not visible.
Any window can have a WindowListener for WindowEvents, including:
- windowClosing, windowOpened, windowClosed, windowIconified, windowDeiconified, windowActivated, windowDeactivated