Installing the Lake.class Applet

Many people enjoy adding a "twist" to their graphics on their webpages. One way to do this is through the use of the "Lake.class" Java applet.

This page addresses the Lake.class file. I state that because there are TWO versions of the Applet. The earlier version had the filename: "lake.class" and the NEW uses "Lake.class." The file available for download here is the LATEST version an is more flexible.

This Java Applet will work with any picture in GIF or JPG format and can be virtually any size. It also can be used as a link and can incorporate an overlay if you wish. Through adding a few lines of HTML code to your page you can "enhance" your favorite picture using the Lake.class file.

The first thing you have to do is "calculate the WIDTH and HEIGHT to enter in your <APPLET CODE> tag. This is easily done and is somewhat "adjustable."

Change "imagename.jpg" to the name of your image file. The width of the applet should be set to the original width of your image in pixels. The height of the applet should be TWO TIMES the original height of the image MINUS "some". How much is "some"? That depends upon the height of your image. Start with:

applet height = 2 * (height of the original) - 10, and then adjust a bit to get the desired effect (usually a little more).

In the example given the WIDTH equaled 480 pixels and the HEIGHT equaled 125 pixels. The result of DOUBLING the HEIGHT and subtracting 10 is (250 - 10 = 240). So in the example below, the WIDTH="480" HEIGHT="240".

Older versions of the applet were "always" shortened by 10, but it's now more flexible to give better perspective on smaller images.

For the simplest display of an image combined with the "Lake.class" applet you must upload the .class file to your directory and add the following HTML to your document:

<APPLET CODE="Lake" width="480" height="240"> <param name="image" value="imagename.jpg"> To make the Image a "clickable link" you need to add the following parameter: <param name="href" value="filename.html"> If you are using the applet as a link in a FRAME setup you can "target" the link to another frame by adding: <param name="target" value="_top"> If you want the effect to appear as a "rocking motion," you add the following: <param name="rock" value="on">
The HTML to install the image and applet below is as follows: <center> <APPLET CODE="Lake" width="249" height="338"> <param name="image" value="mountainlake.gif"> <param name="href" value="htmlhelp.html"> </APPLET> </center>



Click to download the Lake.class file in a ZIP file.

or obtain it directly from the Author's webpage.


Main HTML Help

Site© 1999-2003 Copyright by dcrum@infionline.net