Site hosted by Angelfire.com: Build your free website today!
TheLakeApplet

LICENSE

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.

  1. 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.
  2. 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 permission.
  3. Restrictions. 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 in part.
  4. 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.
  5. 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.
  6. Termination. 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.
  7. Severability. 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.
  8. Integration. 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.

Congratulations...

...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.

Introduction

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:


ren *.cla *.class

The Gallery Example

NB: If you cannot see an applet above, then you may need to extract more file from the .ZIP archive before reading this page.

The code which produces the above is:


<applet code="Lake" width=250 height=250>
 
	<param name="image" value="sunset.jpg"> 
 
 
	<param name="href" value="http://www.demon.co.uk/davidg/spigots.htm"> 
</applet>

Paying for the Applet

There is NOTHING to pay. The applet is completely free. However, if you want to take pity on a poor starving Java programmer I would appreciate it if you clicked on one of the ad banners on my site, such as the one at the top of http://www.demon.co.uk/davidg/spigots.htm or on the main applet page. It would be particularly fab and funky if you see one for HotMaiL (for which I get a thumping great 40 cents...).

But as ever, I make no requirement to do so. Just an agonizing heart-felt plea... (no - you eat the gruel, Grandma; I assure you I'm quite full :-))

Using Lake in a web page (With FrontPage 98)

  1. Create a (temporary) directory for the files (e.g. c:\lake)
  2. Unzip all of the files into the directory
  3. Start FrontPage 98
  4. Open the appropriate web
  5. Change to the folder in the web that contains the page which will contain the lake
  6. Choose "File/Import" from the menu
  7. When the "Import" dialog appears, click the "Add File" button.
  8. Change the "Open File" dialog to the lake directory (e.g. c:\lake)
  9. Select all of the files in the directory (you can do this by clicking the first file, then holding down the "CTRL" key and clicking each of the other files in sequence)
  10. Click the "Open" button to close the "Open File" dialog.
  11. Click the "OK" button to start the import of the files.
  12. The files should now appear in the contents of the FrontPage folder.
  13. Double-click the page that you want to insert a lake in.
  14. Once the page opens, move the cursor to the place on it where you want the lake to appear.
  15. Choose "Insert/Image..." from the menu
  16. When the "Image" dialog appears, change to the folder containing the file you want to appear at the back of the lake. Click this file once and note down (on a piece of paper) the value which appears in the "URL" field.
  17. Now click the "OK" button. The image will now be inserted into page. But it will not yet be rippling.
  18. Right-click the image and choose "Image properties" from the menu.
  19. When the "Image Properties" dialog appears, switch to the "Appearance" tab.
  20. In the size section you should have values for the "Width" and "Height" of the image. Note these down on the same piece of paper that you noted the "URL" value on.
  21. Click the "Cancel" button.
  22. Delete the image you have just inserted. You should be able to do this by just clicking the "Delete" key.
  23. Choose "Insert/Advanced/Java Applet" from the menu.
  24. In "Applet Source" enter "Lake"
  25. In the section labelled "Applet Parameters" click on the "Add..." button.
  26. Enter "image" in the "Name" field
  27. Go to the "Value" field and enter the "URL" value that you previously wrote down on the piece of paper.
  28. Click the "OK" button.
  29. You should now be back in the "Java Applet Properties" dialog. In the "Size" section, click the mouse in the "Width" field.
  30. Replace the current value with the "Width" value that you noted on the piece of paper.
  31. Now click your mouse in the "Height" property.
  32. VERY IMPORTANT: You should now enter a value that is 1.8 times the value for the height that you noted down on the piece of paper. So, for instance, if you originally noted down a value of "100", you should enter 180 into this field.
  33. Click the "OK" button. You should now have a large "J" on the page.
  34. To see the applet running, click on the "Preview" tab at the bottom of the page.
  35. You have set up Lake to run with a single "image" parameter. You can add other parameters by amending the properties of the applet (by right-clicking the applet in the editor view and then choosing "Applet properties"). For a full list of the parameters that can be used, see below.

Using Lake in a web page (HTML editors)

To include Lake in a web page, you should copy all class files into the same directory as the web page and then insert an <APPLET...> tag into the page, e.g.


<applet code="Lake" width= height=>
 
	<param name="image" value="sunset.jpg"> 
 
 
	<param name="href" value="http://www.demon.co.uk/davidg/spigots.htm"> 
</applet>

Each of the "PARAM" tags passes a value to the applet. The examples shown here are the "image" parameter and the "href" parameter. In general the "PARAM" tag has the following format:


<PARAM name="[PARAMETER NAME]" value="[PARAMETER VALUE]">
For a full list of the parameters that can be passed to Lake, see below.

Parameters that can be passed to Lake

The following parameters can be passed to the Lake:

"image"
JPG or GIF file to reflect

"overlay"
JPG or GIF file to use as an overlay

"target"
Target frame

"hRef"
URL to link to

"rocking"
TRUE if boat rocking

You will need to set the height of the applet by trial and error. Start off with the height equal to about 1.8 * height of original image. If you can still see a gap appearing at the bottom of the applet as the waves move backwards and forwards, then you should reduce the height a little.

If you set the "ROCKING" parameter to "TRUE" then you almost certainly need to reduce the height of the applet.

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 exception.

Troubleshooting

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 page 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:
  1. You have not put the class file onto the web site
  2. 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)
  3. 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.
  4. 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.
  5. Some other reason I haven't thought of :-)

Examples from the Web

Tutorials

Collections

Personal Home Pages

Places

Others

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">
    <img src="dglogo.gif"
          width=88 height=31 border=0></a>

It will put a little button on your page that will link through to my Java Spigots page.

It is only a request: feel free to omit it.

Additional Usage Notes

There are additional notes available for this applet at The Lake Applet: Notes

Transferring files

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.

Contacting Me

If you still have trouble getting the applet to work and you have tried all of the possible solutions listed above, then feel to contact me, remembering to include:

  1. A precise description of the problem (do you just get a grey rectangle, or an error message etc. etc.)
  2. The URL of the page containing the applet (that's the actual page - not just the front page on your site)

These two pieces of information will make it a lot easier for me to solve the problem. I cannot guarantee that I will be able to respond to all messages (there's only so many hours in the day...) but sending the URL of a page that doesn't work will greatly increase the chances of getting an answer.

Remember to keep a look out at my web site for new applets.

David Griffiths,

10/10/1998



Created in Glorious Polyphonic HPL
Last updated: Saturday 10 October 1998