Intermediate Tutorial - Using the David Griffiths Lake Applet

This tutorial assumes that you have already downloaded the latest version of David Griffiths Java Lake applet - you will need the file 'lake.class'. If you need this get it from here.

First step is to find a suitable picture to lake. Look for a .jpg file. You can use a .gif file, but it should not be animated or transparent.

Here's the one which we are going to use. The file name is 'Arizona.jpg'

We need to make two copies of this file and modify them. We load the program into PaintShop Pro to make the modifications. When it's first loaded, you take the opportunity to find it's exact size. This image is 256 x 256 pixel size. You don't have to use an image which contains a water scene, but at least try to choose one that will look natural when laked. And for those doubting Thomas's who say 'there's nothing natural about a lake in Arizona', you're wrong, this is a real picture!

Arizonabk.jpg 256 wide x 201 high
This is the background image which will be reflected. 
The image has been cropped at the shoreline where we wish the reflection to start
Foreground.gif 256 wide x 256 high
This is the foreground which will cover part of the laked area. All the area other than the foreground has been deleted and we've used a colour which does not appear in the original image as the background colour. This image must be saved as a .gif with the background set to transparent. You can't use the one above since it's green background has not been made transparent yet. Right click this link to save the one you want.
Next bit, is to put them together using the following HTML code. We've added comments on the right hand side to explain what's going on. This code should be placed on your page where you want the image to appear. A useful tip is to construct the page, using the 'alternate image' (in this case Arizona.jpg) as a place marker and then replace the HTML for this image with the applet code later.
<applet code=lake.class width=256 height=256 /> Here you enter the width and height of the image. In this case, it's the same, but, it doesn't have to be.
<param name=image value="arizonabk.jpg" /> This is the name of the image that will be reflected in the lake.
<param name=overlay value="arizona.gif" /> This is the name of the image which appears in the foreground, this one is optional. This image must have a transparent background and must be saved as a .gif
<img src="Arizona.jpg" alt="Aurora in Arizona" border=1 height=256 width=256 /> This image will appear, if the browser used can not display java.
<param name=rocking value="false" /> This parameter is set to 'true' if you wish the image to rock as if you were in a boat. This parameter can be omitted if you don't want the image to rock. Example with the rocking set to 'true'.
<param name=underwater value="false" /> This parameter is set to true, if you wish to produce an under water picture where the lake is at the top of the image. This parameter may be omitted. Example with underwater set to 'true'.
<param name=target value="_self" /> This parameter allows you to produce the results in a particular frame. Normal frame syntax applies. The parameter may be omitted.
<param name=href value="" /> This parameter is used to enter the URL which will be jumped to if the image is clicked on. This parameter is optional but if you leave it out then clicking on the applet will go to David Griffiths original website - now a domain for sale. The URL shown is essentially a copy of his page.
</applet> The end of the applet code
Now let's see what this looks like, but don't expect miracles, we're not finished yet :)
Aurora in Arizona
See the page displayed - read about the lake in Arizona?
See a different version using the Dorian GrayII applet and the Anfy huerot applet

Now this is where something may go wrong!
If you are using an older version of the applet's class file - one named 'Lake.class', with an upper case 'L', then the foreground may not be in the right place. If that's the case, then it's back to PaintShop Pro to correct it by trial and error. Here's a copy of the foreground image which works with the older versions of the class file. Again, the green area is set to be transparent. If you do have to do this, then remember that PaintShop Pro has a keyboard shortcut where you can move a selected area by holding down the Shift key and using the cursor keys.

 There, simple wasn't it? Have fun, but if you run into problems, feel free to email us for help :)
For a VERY small fee, we'll even do it for you!

Mini-LogoAbout Us | Site Map | Privacy Policy | Contact Us | counter | ©2006 JayDax      

JayDax Computer Information Centre

Using the David Griffiths Lake Applet