FRAMES

The frame class provides windows for applets and applications. A frame is a type of container that is opened through another window, which has a title and border. The constructor for a frame is
Frame myframe = new Frame(“My very first frame”);
When creating a frame the size of the frame can be set with the method void setSize(int width, int height); If the size is never set then the default size is very small.
The method void setVisible(boolean a); is used to control whether or not a frame is visible on the screen.
Setting the location of a frame can bee done by using the method void setLocaion(int x, int y); The top left-hand comer is 0,0. It is important to remember to set the location within the screen size.
Components can also be added to the framed, by creating subclasses of Frame and creating an instance of the subclass.