May 2001
Intermediate to advanced
1088 pages
30h 13m
English
You can run almost any applet as an application but some are easier than others. If your applet does not use the getDocumentBase, getCodeBase, or any of the AppletContext methods, you might be able to get away with creating a frame and launching the applet in the frame. In these cases, the applet is little more than a typical AWT container (remember, the Applet class is a subclass of java.awt.Panel).
Applets are first initialized by the init method, and then started by the start method. Applications, on the other hand, are initialized and started with a static method called main. Fortunately, these methods can peacefully coexist in the same class.
By adding a main method that automatically creates a ...
Read now
Unlock full access