Java Windows: Frames, Dialog
2 Subclasses of Window:
Frame
|
Dialog
|
Menus
Only for windows not for an Applet's panel. However, recall that an Applet can have windows (e.g. frames,etc).
|
GUI Applications
- You can either simply:
- Create a window (e.g. frame) inside of your main() method and then treat it as we have been discussing
- OR have your application class extend Frame so that it now inherits all of Frame's capabilities
- Now simply add components, etc as you have done before with GUI frames inside of applets.
- You can not use any specific methods that belonged to applet, like playing audio clips, etc.
- Also, you may want to exit the program too, with System.exit(0) as you will not have the browser calling Stop(),etc. for you automatically.
- Do exercises in book!
