<APPLET></APPLET>
Applet to invoke a JAVA(tm) application
Allows you to embed a Java applet into your document. You pass a number of parameters
that will be input to the applet when it runs on the browser that supports Java. You
should add some regular HTML after the PARAM elements in case someone out there isn't
using a Java-enabled browser. I know that may come across as a little snobbish, but it's
time to get into the swing of things folks!
As an example:
<html>
<head>
<title>Some Title</title>
</head>
<body>
.
.
==>> <APPLET code="fphover.class" codebase="../_fpclass/" width="120" height="24">
<PARAM name="text" value="Muse">
<PARAM name="color" value="#800000">
<PARAM name="hovercolor" value="#C0C0C0">
<PARAM name="textcolor" value="#FFFFFF">
<PARAM name="effect" value="glow">
<PARAM name="url" value="dm/dmtop.htm" valuetype="ref">
<PARAM name="font" value="TimesRoman">
<PARAM name="fontstyle" value="bold">
<PARAM name="fontsize" value="18">
==>> </APPLET>
.
.
</body>
</html>
This particular example comes from the buttons on my front page. All the values for the
"param" lines are unique to this particular APPLET. Each applet will have things
that it wants you to define so it works properly. I haven't done much exploring in the
Java world yet so I don't know where a all the APPLET's and their descriptions reside.
Give me a little while and I'll include that here. As a start, I might suggest you check
out the Sun site since they are the proud authors of Java.
HTML 3.2 Final
The specification defines the following attributes that can be specified with the
APPLET element:
- codebase
- Use this attribute to tell the browser where to find the particular applet being run.
It's an optional thing, if you don't put it in then the browser assumes that it will look
in the same directory where it got the page from. Since this is a URL then I suppose it
can be on another server somewhere or in the directory where your pages are or just about
anywhere on the Internet. Conjures up some interesting possibilities doesn't it? Anyway,
in the example above, codebase="../_fpclass/", I'm telling the
browser that it will find my code in a directory on the same level as the directory my
page is in. Confused yet? It's "go up one level, then scoot over to _fpclass
to find my applet fphover.class.
- code
- Use this attribute to tell the browser exactly which piece of code is being used in the
applet. This is a required attribute since it wouldn't make much sense to put an applet in
without telling the browser which one. In my sample it is code="fphover.class".
- alt
- Just like on the IMG element, there is an alternative string of text
that you can specify, just in case the viewer of your page isn't running Java. With all
the security concerns and scares that are floating around, that's a real possibility. This
is optional and you'll observe in my sample that I was a bad boy and I didn't put anything
for alt. Another way to deal with Java-less browsers is to put some HTML
code after the PARAM list. I didn't do that either. I suppose at some point I'll be shamed
into doing it but I was being lazy in the short term.
- name
- This attribute is optional. It provides a label for this applet in case another applet
on the same page wanted to find this one. I didn't use this in my example.
- width
height
- These attributes are required and they specify the size, in pixels, of the applet's
initial display area. It doesn't take into account any of the windows or dialogs that the
applet itself might come up with.
- align
- This optional attribute works just like the one for the img element. It
lets you line up the initial display associated with your applet. The alignments allowed
are top, middle, bottom, left and right with the default being bottom.
- vspace
hspace
- These optional attributes specify how many pixels of space to leave at the top and
bottom and sides of the display area. They work just like the attributes for the img
element.
Netscape
Nothing special.
Microsoft Internet Explorer
Nothing special.
Internationlization
Nothing special.
The Rusk Family
. . . "the Legend Continues"
Michael T. Rusk
Comments to author: mrusk@radix.net
All contents copyright © 1996, 1997 Michael T. Rusk
All rights reserved.
Revised: December 03, 1997 10:48 -0500
URL: ./htmlgd/tagapple.html