to home page


Java Applets  
RAM from Crucial.com 


Java Applets

 

HOME
TUTORIALS
LINKS
FORUM
GLOSSARY
NEWS/ABOUT

THIS AREA

MAIN

BASICS
Basic Tutorial
Advance Tutorial

Beyond Tips
frames
sound
video
forms
Java &JavaScript
event handlers

Composer Hints

Reviews

 

 

BWRS
SEARCH

 

 

 

 

 

Java on the Web relies on programs called applets. These are stored in .class files these are linked & set up to a webpage by a set of HTML tags.

Now writing actual applets is beyond the scope of this basic guide, but setting up applets isn't difficult (you'll just need to add few lines of HTML code which effectively set up a link to the applet just in the same way you add graphics to your pages)

You can get tons of applets on the web for free. Usually you'll get a read me document telling you how to set them up and what you need to add to your page. Like all things from the web be careful & use a reliable Java site to get you applets from (potentially you can create a virus like applet that could damage someone's computer if run)


Let's use an example to show you how easy it is to add them (this one was created by Sun Microsystems)

Sorry you need a Java enabled browser to see this

The source. (Click for copyright and precise Java info)

This runs from an applet called NervousText.class

What we need to do is add the following lines of HTML & text to the page

<applet code="NervousText.class" width=375 height=50>
<param name=text value="Leaping text !!!!">
Sorry you need a Java enabled browser to see this
</applet>

The first line sets up the link to our .class applet file and defines the size of the Java box on the page (in pixels).

The second line <param ...> allows us to define attributes (i.e. parameters) of the applets action. These can be complex and varied or simple like here where the command simply tells the applet what text to display. Most applets will require several <param> tags to be set

The 3rd line is just a text line for non Java enabled browsers

And the final line </applet> just closes off the applet

It's not difficult to add the applet, but you'll have to add it in the form of direct HTML coding

The first is to use the insert HTML option from the menu as described elsewhere on this site

If using Netscape 6.x composer you would just enter all 4 lines if setting up the applet.

Earlier versions need to enter the lines separately. You'd enter the first 2 lines in this method but then you'd just type in the text (3rd) line after the 2 HTML tag signs directly on the composer window before entering the lastline via the HTML method

here are tons of free applets on the net just like images. The link menu on the Java v JavaScripts page is one. Check the links section for some ideas. Remember to check the copyright of any you use. Many are downloadable but some your site links to and access (so you don't include the .class file on your site - your site links to a site acting as a server for the applet). Most have a way of giving the HTML directly to you so all you have to do is place it in your documents


There are plenty of sources of info on writing Java in print and online.
Check out our links or our reviewsback to the top

you can now go on to read about Javascripts

JAVASCRIPT
PAGE

Java Script pageJava v JavaScript Page

JAVA V
JAVASCRIPT
MAIN

 

 



terms & conditions copyright © 1999-2003 legal notices
home
credits
contact us link to us