Applet HTML
Home ] Up ] [ Applet HTML ] Macintosh Support ] Security Issues ] FTP Example ] javAPRS Download ]

 

Within the HTML file, a special tag is used to invoke applets like javAPRS. The allaprs.htm map on this web site uses:

<APPLET code="javAPRS.class" codebase="http://www.dummy.net/javAPRS/" height="400" width="600" ID="javAPRS" archive="japrs.jar">
<PARAM name="cabbase" value="japrs.cab">
<PARAM name="drawVectors" value="true">
<PARAM name="mapList" value="txstate^Texas$usacen^Central USA$JUSA^USA $JWORLD^World $usaeast^NE USA$usaseast^SE USA$usawest^West USA$iailinmo^MidWest$JEUROPE^Europe ">
<PARAM name="showMapLabels" value="true">
<PARAM name="dataFile1" value="netc:1234:dummy.server.net">
<PARAM name="showstationnames" value="false">
<PARAM name="showNewStations" value="false">
<PARAM name="dosMap" value="txstate.mp">
<PARAM name="pickBackground" value="true">
<br>
Sorry, your browser doesn't do Java.
<br>
</APPLET>

The CODEBASE parameter specifies where the jar and cab files are located.  This is accomplished with the CODEBASE parameter.

CODE tells the browser which class file to start executing. As other class files are called by the program, they will be automatically loaded.

The ARCHIVE tag specifies the jar file containing the applet program. Java normally puts each class in a separate file, so to run the program a browser must open a connection for each (presently 17)!  The jar file is signed so your browser will allow it (with the user's approval) to access a data feed from another site.  Microsoft uses a cab file for this function.  Hence, the cabbase parameter must be included, as well.

WIDTH and HEIGHT specify the amount of space which should be reserved for the applet. javAPRS automatically uses as much space as is allocated, however it is possible to make the space too large for the graphic buffers to be created, causing the program not to run. Unfortunately, there isn't any way to predict this, but sizes up to 500 by 300 seem to work fine.  javAPRS now includes a status line which takes 22 pixels in height.

Any other information which must be passed to the applet is done with the PARAM tag, specifying the name and value of each parameter. The cabbase parameter must be specified as shown to support Microsoft browsers.  Each parameter has a default value, and need not be entered if the default value is desired. All the parameters which javAPRS understands are detailed on the Parameters page.

Any text or other HTML commands which appears between the <APPLET> and </APPLET> tags will only be displayed if the page is being viewed on a browser which doesn't understand Java. Instead of the highly informative error message shown here, you could display a GIF file of what the applet would look like.

 

APRS is a registered trademark of APRS Software and Bob Bruninga, WB4APR.

Copyright © 2005 - Peter Loveall AE5PL pete@ae5pl.net
Hosted by AME Corp.