David Wallace Croft
croft@alumni.caltech.edu
1997-10-15
Applets are "live".
Example: a multiplayer arcade game interface.
Applets are secure. They cannot read from or write to your hard drive while you are using them.
<APPLET CODE="NCMECbanner.class" CODEBASE="http://www.missingkids.com/java/" WIDTH=342 HEIGHT=128 > An applet would be here. </APPLET>
Notice that, like a graphics image, the applet can be loaded from a different server. In the above example, it is being loaded from www.missingkids.com.
The CODEBASE specifies the server and directory from which the classes are loaded. The codebase attribute is optional; if it is not specified, the browser will assume that the classes should be loaded from the same URL (server and directory) as the web page.
The optional ARCHIVE attribute provides a list of pre-compressed files including classes, multimedia, and data files that your applet may need. The archive files are downloaded and checked first before individual files are sought from the server.
<APPLET CODE=SlideShow.class WIDTH=460 HEIGHT=160 > <PARAM NAME="music" VALUE="tophit.au"> <PARAM NAME="pausetime" VALUE="10" > <PARAM NAME="slide0" VALUE="me.gif" > <PARAM NAME="slide1" VALUE="bear.jpg" > <PARAM NAME="slide2" VALUE="dog.gif" > </APPLET>
If your applet does not work, there could be a number of problems.
To check if your applet is crashing in Netscape Navigator, click on "Communicator" and then "Java Console" to view the error output.
Embedded in this web page is an applet which you put in your HTML pages right away. In Netscape Navigator, click on "View" and then "Page Source" to copy the applet tag and then paste it into your pages.
http://www.alumni.caltech.edu/~croft/research/java/applet/
Copyleft 1997
David Wallace Croft
Posted 1997-10-15