You are here:  NetStrider » Tutorials » HTMLRef » Commands » APPLET «

HTML Reference Guide

Author: Randy D. Ralph.   In place March 1, 1999.   Copyright © 1999 NetStrider.   Presented as a public service.

BACK <APPLET> Command next

Command Syntax:

<APPLET command parameters>
  Java Applet Parameters
  <BLOCKQUOTE>Some alternate text</BLOCKQUOTE>
</APPLET>

The <APPLET> command tag pair establish and contain instructions for the browser on how to locate, load and run a Java applet within the browser window.  the <BLOCKQUOTE> command contained within the command tag pair displays some alternate text to browsers which are not Java capable and cannot run the applet.  Java capable browsers ignore the alternate text and run the applet using the defined display parameters.

Command Parameters: 
align="alignment"

Specifies the alignment to be used for the display window for the Java applet where:
• left -
aligns the applet to the left margin and wraps text around the applet window.

• right -
aligns the applet to the right margin and wraps text around the applet window.

• top -
aligns the applet to the top if placed in line with text.

• bottom -
aligns the applet to the bottom if placed in line with text.

• middle -
aligns the applet to the middle of text if placed in line with text.
• abstop -
aligns the applet to the absolute top (height of ascenders) if placed in line with text.

• absbottom -
aligns the applet to the absolute bottom (depth of descenders) if placed in line with text.

• absmiddle -
aligns the applet to the absolute middle of text (between ascenders and descenders) if placed in line with text.

• texttop -
aligns the applet to the top of text (height of ascenders) if placed in line with.

alt="alternate display text"

Optionally designates some alternate text which will display while the applet is loading or if, for some reason, the applet fails.

codebase="URL"

Optionally designates a base URL at which the code for the Java applet can be found by the browser.  This can be either a local directory or a remote site on the Internet.

code="file name"

Provides the name of the file which contains the Java applet code.  If the optional codebase= command parameter has been used, the browser will look in the directory or at the base URL provided for the code

codebase="URL"

Optionally designates a base URL at which the code for the Java applet can be found by the browser.  This can be either a local directory or a remote site on the Internet.

height="pixels"

Defines the height, in pixels, of the space in which the applet will appear.

width="pixels"

Defines the width, in pixels, of the space in which the applet will appear.

hspace="pixels"

Defines the width, in pixels, of the horizontal standoff, or amount of white space to place between the edge of the applet display space and any text wrapped around the applet display.

vspace="pixels"

Defines the height, in pixels, of the vertical standoff, or amount of white space to place between the edge of the applet display space and any text wrapped around the applet display.

name="applet name"

Establishes the name of the applet within the context of the HTML document.

param name="parameter name" value="parameter value"

A number of such statements can be used to name and define the value of applet parameters or data values which can be called within the body of the HTML document.

Example:
This example is available at: http://java.sun.com/openstudio/ along with other downloadable free applets.  See Adding Java Applets to Your Page.

<applet codebase="../../../tppjava" tppabs="http://www.netstrider.com/tutorials/HTMLRef/classes/" code="JavaQuote.class" tppabs="http://www.netstrider.com/tutorials/HTMLRef/classes/JavaQuote.class" width="300" height="125" > <param name="bgcolor" value="ffffff"> <param name="bheight" value="10"> <param name="bwidth" value="10"> <param name="delay" value="1000"> <param name="fontname" value="TimesRoman"> <param name="fontsize" value="14"> <param name="link" value="http://java.sun.com/events/jibe/index.html"> <param name="number" value="3"> <param name="quote0" value="In our 12 years of international application development, in 42 different languages, we have found Java the easiest to implement world spanning applications.|- MicroBurst Inc.|000000|ffffff|7"> <param name="quote1" value="Simplicity is key. Our customers need no special technology to enjoy our services. Because of Java, just about the entire world can come to PlayStar.|- PlayStar Corporation|000000|ffffff|7"> <param name="quote2" value="The ubiquity of the Internet is virtually wasted without a platform which allows applications to utilize the reach of Internet to write ubiquitous applications! That's where Java comes into the picture for us.|- NetAccent|000000|ffffff|7"> <param name="space" value="20"> </applet>
Return to Section A:D


Return to the List of Commands.
Author: Randy D. Ralph.  In place March 1, 1999.  Copyright © 1999 NetStrider.  World Rights reserved.




Hosted by uCoz