|
|
AWT Frame windows
When working with applets, the
applet viewer or Web browser automatically creates a
screen window for your program's output to appear in.
However, if you are writing a stand-alone application
(described in the next unit) your program must create its
own main window. Typically an object of class Frame does
this. The figure below shows the appearance of an empty
Frame object on a Windows system.
This can be created by:
Frame
myFrame = new Frame("Run");
myFrame.show();
The show() method makes the frame
visible on the screen.
Of course, an empty Frame is not
particularly useful. The next unit describes the role of
the Frame class in providing stand-alone Java
applications.
|
|