Using the Applet Viewer
In addition to running the applet using a web browser such as Internet Explorer, you can view it using the "appletviewer" program that comes with the JDK.
You can view an applet by executing a command such as:
> appletviewer hello.html
Notice that we run appletviewer on the HTML file, not the applet itself.
The appletviewer program looks for the applet tag in the HTML file you give it to determine what to display.
It will not display the HTML around the applet, just the applet itself.
NEXT
Selena Sol contributes to the JavaBoutique's Introduction to Java. Selena curently works for Barclays Capital in London, one of the leading global investment banks in Europe and has worked as a software developer for the National Center for Human Genome research, Microline Software, Neuron Data, and Electric Eye in Singapore. Selena is perhaps best-known for creating the Public Domain Web Script Archive (Extropia) and writing several books on Web Programming (Perl, CGI, Java).
Email: selena@extropia.com
|