GUI application or Applet
- four basic steps
- design your GUI
- what Container objects will you use?
- what Component objects will you choose to be contained in which Container?
- what Layout will you use to organize those Components contained in a Container?
- what Event will happen?
- compose your GUI by adding components to Container objects
- setup event handlers to respond to user interaction with the GUI
- display the GUI
- Applications versus Applets
- recall that Applet is a Panal which uses FlowLayout as the default layout manager; the init() method will be called by the browser or applet viewer automatically to display the applet
- applications run from a command prompt; the virtual machine loads the application class and calls the application's main() method
- by default an application does not have a security manager while the existing browsers and applet viewers will create their own security manager when starting up
- operations like file I/O can be done more easily in an application
- Examples in jdk directory \demo\applets\TaiTacToe , DrawTest and
Can be Both