Lake Applet Tutorial

If you're using, and or designing for Internet Explorer, here's a bit of an applet update for the daring to try if you wish! Actually, its not all that hard so I just might change the applets on this site one Anyway, here you go:      javascript and applets

Ok, you need three (3) items for a Lake Applet. (1) an image or photo, (2) the lake.class file, and (3) the lake applet code on your page. All three (3) of these things must be in the same folder on your computer or in the same directory on the internet. If your items are in separate folders you will have to use the codebase tag, but for now lets just make a quick Lake applet the same as the one above.
Ok, remembering that all three (3) things need to be in the *same* folder, download the image and lake.class file below. No fuss, no muss, no worries, its only the same little picture as above and the Lake.class so don't go all security

You may have to right click and *save target as* with internet explorer browsers, or right click and *save link as* with netscape browsers

Download the image    here

Download the lake.class file   here


Now all you need is the applet code to put on your *html* page. So, making sure that the page you want the Lake applet to be on is an *html* page and is in the *same* folder as the image and lake.class, just block and select the short code between
======= lines below and copy and paste the code into your *html* page where you want the applet to be. Use the copy and paste commands under *edit* or hold down Ctrl and hit C to copy, hold down Ctrl and hit V to paste.Thats it, thats all, your applet should be running.


<applet code="lake.class" id="lake" width=300 height=376>
<param name="image" value="crater-1.jpg">
<param name="href" value="" target="_self">


*Any* image or photo can be used, just remember to (1) change the image *value* to your image name, (2) change the *href* value to the name of the same page you put this applet on, eg., "" (absolute) or "quickt.html"(relative) (its possible that if people click on the applet without this, it'll redirect them to another website), The *_self* simply tells the browser to reopen the same page in the same window. If for some reason you actually want them to go to another webpage, by all means, add the url without the 'target="_self"'. (3) change the applet width to *your* image width, and the applet height to twice *your* image height less approximately 20 points..(e.g., say your image is 400wX200h. The applet width would be 400 and the applet height would be twice 200 which is 400, less 20 which gives you, in this case, an applet height of 380). You only need the Lake.class in any *same* folder or directory *once* no matter how many Lake applets you have in that *same* folder or directory.

When you get your lake applet working (one thing at a time), see how to add a *border* to your applet by following the link at the bottom of this page.

Ok, now, a bit about uploading and the codebase and online editors. If you're creating your pages on your computer and uploading them via ftp, just fire away and upload your *html* page with the applet code on it, the image, and the lake.class file. (upload the Lake.class as binary code..the same way you'd upload an image).

If you're using an online editor, just copy the applet code above into your *html* page where you want the applet to be and save it. Remembering that if you use a different image, make sure to change the image name to your image name, and set the applet width to your image width, and the applet height to twice your image height less 20 or so points. Then, using the upload utility on most servers, browse, find the image and lake.class, and upload them.

About the codebase tag. The only time you'd need to use the codebase is if, say for instance you have your images in a folder called, what else, *images*, and the Lake.class in a folder called *classes* in your *directory* on the internet. (keep them all in the *same* folder on your computer, it makes life soooooooooo simple).
At any rate, if you must use the codebase tag, here's an example how. Say your image is in a folder called *images* in your directory, and the lake.class is in a folder called *classes*. Well, you have to tell the browsers where to find them, so after *value* just put the folder name in front of the image name like in the example below. And in order for the browsers to find the lake.class file you have to add CODEBASE to the APPLET CODE line like in the example below pointing to the folder in your directory that you have your lake.class file in. Have fun.

this is a codebase example only below

<applet code="lake.class" codebase="classes/" id="lake" width=300 height=376>
<param name="image" value="images/crater-1.jpg">
<param name="href" value="quickt.html" target="_self">

If you're having problems adding applet code using editors such as Tripod's Site Builder (Trellix), Geocities PageBuilder, or Homestead's SiteBuilder, email me below.

Play with the applet code for a bit and then come back and go  here   to see how to add a border to your applet.

Any problems? Email me at   Bruce