|
Instructions
|
Download file clockman.zip (9 Kbyte), unpack it and put file ClockManApp.class in your
HTML directory. Put text into your page:
<APPLET CODE="ClockApp.class" WIDTH=200 HEIGHT=200>
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. 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 file in
/~ivan_mcg/classes/ . I have to use next code:
<APPLET CODE="ClockApp.class" 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 or even at another server (you have
to define protocol and server name at CODEBASE attribute).
You can set a number of parameters using <PARAM> tag - <PARAM
NAME='ParamName' VALUE='ParamValue'>. Place them after
<APPLET> tag (see examples).
Parameters available:
- FACE
- This optional parameter lets you change colour of ClockMan's face.
ParamValue must be colour in one of two formats: hexadecimal number
(#RRGGBB) or list of 3 decimal numbers (red, green and blue components),
delimited by spaces, commas or semicolons (for example,
'255,128;;;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).
- NOSE
- This optional parameter lets you change color of ClockMan's nose.
- HCOL
- Color of hour arrow (opt.).
- MCOL
- Color of minute arrow (opt).
- SCOL
- Color of second arrow (opt).
|