next up previous
Next: Performance Up: Interactive Textbooks; Embedding Image Previous: Thinning

Communicating Applets

The independent operators described in the previous section can be embedded and interact in an HTML document for display in a Web page. This can be achieved by the following piece of HTML code:

     <APPLET CODE="AddNoise.class" WIDTH=800 HEIGHT=400>
     <PARAM NAME=images  VALUE="images/holesquare2.gif">
     </APPLET>

which adds the applets to an HTML page.

If the parameter named images is given a value (as in this case) then it used, otherwise a default image is loaded.

Then, the output image from each applet is linked to the next one down the page so that it can be further processed. The way this is achieved is by giving each applet the ability to communicate with the next one.

The procedure which JAVA employs to grant applets the privilege of communicating with each-other is fairly simple and works as follows:

Now each applet can pass its image to the next applet. To make the communication procedure more general, a parameter has been added which can be set from the relevant HTML document. This parameter is called receiver_applet and is used to set the destination of the resulting image of an applet. If this parameter is missing, the default is to send the image to the next applet in the manner described above.



next up previous
Next: Performance Up: Interactive Textbooks; Embedding Image Previous: Thinning



Bob Fisher
Fri Jul 4 16:11:50 BST 1997