|
1. Download the Lake
applet zip file here. Once you download it, unzip it using WinZip.
2. Lake needs a single
parameter called "image" for the gif or jpg file containing the background.
3. Add the Java applet
code to your HTML document. Here's the code that creates the above:
<APPLET CODE="lake"
width=251 height=260>
<param name="image"
value="/tutorial/html/tutweb/sunset.gif">
</applet>
4. The sizing of the applet
is important. The width should be the same as the width of the image, but
the height should be set to twice the height of the image - 10. So if you
have an image that is 200 pixels high, the applet should be (200 * 2) -
10 = 390 pixels high.
Shortening the image by
10 pixels ensures that a gap doesn't appear as the waves lap backwards
and forwards.
5. Make sure you pu-load
the file lake.class to the same directory as the html page that the lake
effect is on for it to work.
|