Instructions
|
Put file WaveClockApp.class
in your HTML directory. Put text into your page:
<APPLET CODE="WaveClockApp.class"
WIDTH=200 HEIGHT=120>
Some text for users of browsers which does not support Java:
Your browser does not support Java or Java is not enable.
</APPLET>
and you will see my clock applet on your page! |
You can change HEIGHT and WIDTH as you want, but not less than 50. Also you can
specify ALIGN as in <IMG>: LEFT, RIGHT, BASELINE etc.
If you want keep HTML files and Java classes in different directories, you can use
CODEBASE attribute of <APPLET> tag. For example, I put my page into
/~ivan_mcg/appletsdoc/
, and applet's class files in
/~ivan_mcg/classes/
. I ahve to use next code:
<APPLET CODE="WaveClockApp" WIDTH=200 HEIGHT=200
CODEBASE=/~ivan_mcg/classes>
Your browser does not support Java or Java is not enable.
</APPLET>
In fact, applet can be at another man's directory and even at another server (you must
define protocol and server name in CODEBASE attribute).
You can set a number of parameters using <PARAM> tag - <PARAM
NAME='ParamName' VALUE='ParamValue'>. Place it after
<APPLET> tag (see examples).
Parameters available:
- FORE
- This optional parameter lets you change color of text. ParamValue
must be color in one of two formats: as hexadecimal number (#RRGGBB) or list
of 3 decimal numbers, delimited by spaces, commas or semicolons
(for example, '255, 1128;;;0' is valid value).
- BACK
- This optional parameter lets you change color of background.
ParamValue must be color in one of two formats (see about FORE
parameter).
- SHAD
- This optional parameter lets you change color of digit's shade zones.
ParamValue must be color in one of two formats (see about FORE
parameter).
- MODE
- This optional parameter lets you change style of digits. This is number of 2
digits: "DL". "D" is style of dark zones of digit (0 - fill, 1 - "empty"). "L" is
style of light zones (0 - fill, 1 - "empty").
- COUNTMODE
- If this parameter is set to "1", time over your page will turn back... This
idea is by Vladimir Kaluga.
- HIGH, LOW
- You can get simple 3D effects by this 2 parameters (they are
independent). HIGH defines color of up-left side of light zones.
LOW defines color of down-right side of dark zones of digits.
Examples
<APPLET CODE="WaveClockApp.class" WIDTH=300 HEIGHT=150>
<PARAM NAME=MODE VALUE=11>
Your browser does not support Java or Java is not enable.
</APPLET>
|
|
<APPLET CODE="WaveClockApp.class"
WIDTH=300 HEIGHT=150>
<PARAM NAME=MODE VALUE=2> <PARAM NAME=BACK VALUE='0,,64;228'>
<PARAM NAME=SHAD VALUE=#0040FF>
Your browser does not support Java or Java is not enable.
</APPLET>
|
|
<APPLET CODE="WaveClockApp" WIDTH=300 HEIGHT=150>
<PARAM NAME=COUNTMODE VALUE=1>
<PARAM NAME=BACK VALUE=#000080>
<PARAM NAME=FORE VALUE=#808080>
<PARAM NAME=HIGH VALUE=#FFFFFF>
<PARAM NAME=LOW VALUE=#000000>
Your browser does not support Java or Java is not enable.
</APPLET>
|
|
Read more about <Applet> tag.
© Ivan 'MCG' Boldyrev, 1999.