This license ("License") contains rights and restrictions associated
with use of the accompanying software. Read the License carefully
before utilizing the software. By using the software you agree to be
bound by the terms and conditions of this license.
- Limited License Grant.
David Griffiths ("The author") grants to you ("Licensee") a nonexclusive, nontransferable,
worldwide, royalty-free license to use this The Lake Applet
software (the "Software"). Licensee agrees that it shall not use the
Software for computer operations of any critical nature.
- Source Code
Whilst the author may occasionally make source code available, it is NOT
in the public domain and the author retains full copyright over it.
UNDER NO CIRCUMSTANCES may software be sold containing code derived
from this source code without David Griffiths giving his explicit
The Software is copyrighted and title to all copies is retained by
the author. Licensee shall not make copies of Software, other than
a single copy of Software in machine-readable format for back-up or
archival purposes and, if applicable, Licensee may print one copy of
on-line documentation, in which event all proprietary rights notices
on Software and on-line documentation shall be reproduced and applied
to all copies. Unless enforcement of this provision is prohibited by
applicable law, Licensee shall not modify, decompile, disassemble,
decrypt, extract, or otherwise reverse engineer Software. Software
may not be transferred, leased, assigned, or sublicensed, in whole or
- Disclaimer of Warranty.
The Software is provided "AS IS," without a warranty of any kind.
ALL EXPRESS OR IMPLIED REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
IMPLIED WARRANTY OF MERCHANT-ABILITY, FITNESS FOR A PARTICULAR PURPOSE
OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
- Limitation of Liability.
IN NO EVENT WILL THE AUTHOR BE LIABLE FOR ANY LOST REVENUE,
PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THEORY
OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE,
EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Licensee may terminate this License at any time by destroying all
copies of Software including any documentation. This License will
terminate immediately without notice from David Griffiths if Licensee fails
to comply with any provision of this License. Upon termination,
Licensee must destroy all copies of Software.
If any of the above provisions are held to be in violation of applicable
law, void, or unenforceable in any jurisdiction, then such provisions
are herewith waived to the extent necessary for the License to be
otherwise enforceable in such jurisdiction, However, if in
the author's opinion deletion of any provisions of the License by
operation of this paragraph unreasonably compromises the rights or
liabilities of the author, David Griffiths reserves the
right to terminate the License and refund the fee paid by Licensee as
Licensee's sole and exclusive remedy.
This Agreement is the entire agreement between Licensee and David Griffiths
relating to Software and: (i) supersedes all prior or contemporaneous
oral or written communications, proposals and representations with
respect to its subject matter; and (ii) prevails over any conflicting
or additional terms of any quote, order, acknowledgment, or similar
communication between the parties during the term of this Agreement.
No modification to the Agreement will be binding, unless in writing
and signed by a duly authorized representative of each party.
...upon choosing this product. Not only will it improve your health,
and enhance your general spirituality, it will also clean the bath, cook
you breakfast, take care of the children, end armed conflict and
invigorate the look of your web page.
You should be careful to check that your unzipping program has named
the files correctly. Some DOS programs will name according to the old
8.3 format, rename .class files "*.cla". You can rename
them by opening up a DOS window and typing:
The Gallery Example
NB: If you cannot see an applet above, then
you may need to extract more file from the archive before reading
The code which produces the above is:
<applet code="Lake" width=250 height=250>
<param name=image value=sunset.jpg>
Using Lake in a web page...
To include Lake in a web page, you should copy the Lake.class file into the
same directory as the web page and then insert an <APPLET...> tag into the page, e.g.
<APPLET CODE="Lake" WIDTH=250 HEIGHT=258>
<PARAM NAME=image VALUE="sunset.gif">
Put something here for browsers that don't use Java.
The Lake.class file is the only file from the zip archive that needs to
be copied onto the server.
The following parameters can be passed to Lake:
- This parameter specifies the horizon picture that will be
reflected in the lake.
- You can use this parameter if you want a static picture to
overlay the moving image of the lake. A good idea is to use a
transparent .GIF for this so that you will not hide to so much
of the animation.
- You can now use the applet as a hyperlink, by setting href to
the name of the page you want to link to.
- If you are using the applet as a hyperlink then you can set
this value to specify the target frame. If you don't set a
target value then the new page appear in the current frame.
The height of the applet should 2 * (height of the image) - (a little bit).
How much is a little bit? Well it depends upon the height of you original image. The
best thing to do is to start with the applet height = 2 *(height of the original) - 10, and
then play around a bit after that. Older versions of the applet were always shortened by
10, but it's now more flexible to give better perspective on smaller images.
I'd suggest you put the Lake.class file in the same directory as the page on
which it will appear. If you want to move it elsewhere
then use the "CODEBASE" option to point to the appropriate directory.
Some implementations of Java will not allow you to put the .class file in one
subdirectory and the image file in another. If the try it might cause a security
- If the applet just says "Loading images..." when it is run off
the server and never shows the image, the chances are there are
problems with the image. If the image is too large then it may
not be able to create the animation in memory. On the other hand,
it may be that the image is not accessible. Have you spelt the
image filename correctly in the
line? Again you will need to check the case and also the file
- On some platforms (notably X terminals with very little memory)
the animation does not start properly. The reason for this is
that the animation frames are created in a buffer image. If the
original image is large, then the frames image will be very large.
I'm thinking about changing the applet to create the
frames in real-time in these instances. However, the speed may be
slowed down sufficiently that a blank applet might be seen to be
- If you make the applet too large then you will notice a grey strip
appear at the bottom of it as the waves lap backwards and forwards.
The solution is to make the applet a bit smaller...
- On an artistic note, it is not a good idea to use an image that
already has a horizon. If you look across the surface of a lake you
will not see the horizon reflected in the surface. The best solution
is to cut the image *at* the horizon.
- Do not use transparent GIFs with the applet's "image" parameter.
There is no problem using transparent GIFs for the overlay
parameter - in fact this is recommended.
Why won't the applet work off my hard disk?
Some web browsers have trouble opening applets straight from a hard disk.
I have noticed this happen with Internet Explorer 3 and Netscape 4. Once
you have loaded the class file and the web age onto your web site you
should find it works OK.
Why does my web page say "Class Format Error"?
Class files are binary files, just like image files are. Binary files
contain more information than text (also known as ASCII) files do. If
you transfer class files as if they were ASCII files then they will
lose this extra information and will become corrupted. How do you
transfer class files as binary files? You should transfer them in
the same way that you transfer image files.
Why does my web page say "Class Not Found"?
This is a very common problem. It may be because of one of the following:
- You have not put the class file onto the web site
- You are not calling the file with the correct name
(rename to use the same combination of upper- and
lower-case letters as your class file)
- Your transfer program has changed the name. This
does happen. Some programs will shorten the ".class"
extension to ".cla". Other will change the case of the
letters to either all uppercase or all lowercase. See
if you can change the options on the transfer program
to stop it doing this.
- You have include a "codebase=…" clause inside your
<applet…> code in your web page. "codebase=…" tells
the browser to look some place else for the class file.
- Some other reason I haven't thought of :-)
Examples from the Web
If you think you have come up with a particularly inventive way of using
this applet then please email me so I
can think about including it as an example here.
Linking to my site
If you use this applet then it would be nice if you gave me a link
by copying the image:
(this is the file "dglogo.gif" in the .zip archive)
into the same directory as your web page and then pasting the following
into your page.
<a href="http://www.demon.co.uk/davidg/spigots.htm" target="_top">
width=88 height=31 border=0></a>
It will put a little button on your page that will link through to my Java Spigots
It is only a request: feel free to omit it.
Additional Usage Notes
There are additional notes available for this
The Lake Applet: Notes
Remember that if you are transferring the .class file to
another machine with FTP, you should set the 'binary' mode on. Failure
to do so will corrupt the file and give rise to a "Class Format" error.
Remember to keep a look out at
my web site
for new applets.
Created in Glorious Polyphonic HPL
Lastupdated: Thursday 4 June 1998