JavaScript EditorBest javascript editor debugger     Ajax website 

Main Page

Previous Page
Next Page

Inserting Java Applets

Java applets are little applications (hence the term applets) that can run in your browser to create special effects on your page, like clocks, calculators, and interactive events. There are whole books devoted to Java; here we'll restrict the topic to how to insert applets on your page once you've written or copied them from another source.

To insert an applet:

Type <object codetype="application/ java" classid="java:file.class", where file.class is the name of the applet you want to embed.

Then type width="w" height="h", where w and h are the applet's size in pixels.

Close the opening object tag with >.

Include any parameters, with <param name="parameter" value="value_of_parameter" />.

Finally, type </object> to finish.

Figure 18.56. This applet doesn't have any parameters to adjust. Everything is in the opening object tag.

Figure 18.57. Applets let you create interactive, multimedia effects on your page without having to know how to program or script.


  • You can get more information about Java applets at:

  • You don't need to know Java to be able to use applets on your page.

  • You can also use the deprecated, but still supported applet element to embed Java applets on a page: <applet code="applet.class" width="w" height="h"><param name="param_name" value="param_value" /></applet>, where applet.class is the name of the applet to be embedded and the other values are the same as described above.

Previous Page
Next Page

JavaScript EditorBest javascript editor debugger     Ajax website