
Go up to Top
Go forward to The Context of an Applet
The APPLET Tag
The APPLET tag takes the form:
<APPLET | code="applet-name.class"
archive="url-for-applet-jar-file" |
| | width=width-in-pixels
height=height-in-pixels |
| | align=left|right|center|top|bottom
vspace=space-in-pixels |
| | hspace=space-in-pixels> |
|
| HTML text to describe alternative material to display if browser |
| does not support Java applets. |
</APPLET>
|
The attributes included in the APPLET tag have the following meanings:
- code
- The code attribute provides the name of the Java "class"
containing the methods that specify the behavior of the applet.
This file will be named "SomeName.class" where "SomeName.java" is the
name of the file containing your Java code and "SomeName" is the name
that appears after the words "public class" near the top of the
"SomeName.java" file.
- archive
- The archive attribute specifies the URL for a
".jar" file containing the
Java virtual machine code produced when Metrowerks translated the
contents of your ".java" file. Because Metrowerks
puts the translated code in the ".jar" file within the starter folder,
the string specified for this attribute will usually simply be
an appropriate URL for this ".jar" file.
- width
- The width attribute determines the width of the rectangle
within the web browser window that is associated with the browser
when the file displaying the APPLET tag is viewed.
- height
- This attribute determines the height of the rectangular
region reserved for the APPLET within the browser's window.
The remaining attributes -- align, vspace and hspace -- behave
just like the corresponding attributes of the IMG tag.
