Java Applets

Applets are small applications that receive a window-like portion of the screen for input and output. We have a step-by-step introduction to applets. An HTML file with an applet might look like:
...
<APPLET code="Rolodex.class" codebase="/2R350/applets"
    width=162 height=228 align="center">
<PARAM name=imagesource value="/2R350/images">
<PARAM name=images
    value="debra.gif|vakgroep.gif">
<PARAM name=direction value="LEFT">
<PARAM name=pause value=3000>
<PARAM name=nap value=10>
<PARAM name=soundsource value="/2R350/audio">
<PARAM name=soundtrack value="spacemusic.au">
<IMG align="top" src="/2R350/images/debra.gif">
</APPLET>
...

The browser will reserve an 162x228 portion of the document window for the Applet. It will execute the Rolodex applet with the specified parameters.

If the browser is not Java-enabled it should show the specified image.

Note: Not all browsers support the Java 2 platform, which is needed for applets that use the "Swing" classes. Sun offers a Java Plug-In that is needed to run Swing applets in such browsers. If the above applet were a Swing Applet the "HTML" code for Internet Explorer would include the following:


<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
  width="162" height="228" align="center"
  codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
<param name="CODE" value="Rolodex.class">
<param name="CODEBASE" value="/2R350/applets">
<param name="type" value="application/x-java-applet;version=1.3">
</OBJECT>
For Netscape Navigator the code would include:

<EMBED type="application/x-java-applet;version=1.3"
  java_code="Rolodex.class"
  java_codebase="/2R350/applets"
  width="162" height="200" align="center">
</EMBED>