Using appletviewer:
The appletviewer utility is used to shown the applet as it would be seen through the browser without displaying any of the HTML document itself. In the case of FilledBox.html, appletviewer will display a filled box in its own window:
appletviewer FilledBox.html
For comparison you can open the file FilledBox.html using a Java-enabled Web browser. Both the applet and the text are displayed.
If there is more than one applet in a page, appletviewer will open a separate window for each applet a Web browser will show them in their respective locations within the same Web page. One rather nice feature of appletviewer is that it can load classes from across the network, not just from files. Only provides appletviewer the URL of the HTML document holding one or more applets, and it will load the applets as if they were on your local disk. Notice that, however, that the securityManager for the appletviewer may expose your system to greater risks from network loaded applets than would a Web browser like Netscape Navigator.
Appletviewer makes it possible to distribute and run java applets without the aid of a Web browser, so the selection among writing applets versus applications becomes less critical. Most applets are easy to convert into applications and vice versa. The key to this convertibility is to prevent placing a lot of code directly in the main, init, start, stop and destroy methods, and use called to generic methods instead.