Java applets are a widely supported means of adding advanced functionality to your web site without requiring multiple plugins, although Java can be slow to load. All current browsers support Java (although it creates some screen refresh problems in IE5.5), although users can turn off Java support within their browsers.
To add a Java applet to your Dreamweaver document select Insert Media Applet or use the Insert Applet icon in the Object panel's Special category (see Figure 5-1). Select the applet's .class file in the Select File dialog box. As with Flash and Shockwave objects, Dreamweaver creates the HTML for you and uses a placeholder to represent the Applet position in your document, as shown in Figure 5-13.
Figure 5-13. Java Applet placeholder and Property inspector
After inserting the applet, you must set up its properties. If you obtained an applet from the Internet, it probably included instructions regarding its required parameters. (If you were provided with the applicable HTML code, you can copy it into the Code pane of Dreamweaver's Document window.) If necessary, contact the applet's developer for documentation or assistance in using the applet.
If applicable, provide required parameters using the Parameters button in the Property inspector. This button opens the Parameters dialog box shown in Figure 5-14.
Figure 5-14. Applet Parameters dialog box
Use the plus (+) button to add each new parameter name and value pair. Once you have added all required parameters, click OK. Dreamweaver will insert HTML code that looks something like this for your Java applet:
<applet code="mimbounce.class" codebase = "/java%20apps/mim" width="32" height="32"> <param name="motion" value="1"> <param name="fps" value=10> <param name="maxstep" value=4> <param name="bgcolor" value="255 255 255"> <param name="border" value=3> <param name="total" value=4> </applet>