Adding applets enabled with JavaTM technology to your site is much like adding images. The page on which you wish to present the applet needs to reference the location of the applet code. Applet code filenames end with .class . You must include the following HTML code in a web page to load an applet named xxx:
<APPLET CODE="xxx.class" WIDTH="100" HEIGHT="100">
</APPLET>
Referencing the above syntax, the xxx.class must be located in the same directory as the HTML file which is calling it.
You may also load .class files that are in different directories than the HTML file. To do this you need to add the CODEBASE attribute to the APPLET tag. The example below would load the applet named xxx.class from the subdirectory applets:
<APPLET CODE="xxx.class" CODEBASE="applets" WIDTH="100" HEIGHT="100">
</APPLET>
Some applets offer the webmaster the freedom to change certain parameters which affect the behavior of the applet. An example of an applet which takes parameters:
<APPLET CODE="xxx.class" WIDTH="100" HEIGHT="100">
<PARAM NAME=backGroundColor VALUE="FFFF00">
</APPLET>
NOTE: all file names are case sensitive. Whenever an applet fails to load or reports that it cannot locate a graphic or a class file, the first thing to check is that the names match exactly.
Download one of our freebie applets now!
For a more complete description of all the possible applet parameters see:
If you have any suggestions or comments regarding the contents of this page, we welcome your feedback.
|