More Information about the Clock Applet


Start the Clock applet in its own window here.

The Clock applet has the following parameters:

bgcolor The background color of the applet in RGB hexadecimal.
border The surrounding clock border in pixels.
ccolor The color of the clock in RGB hexadecimal.
cfont A "|" delimited string that represents the name, type (PLAIN, BOLD, ITALIC), and the point size of the clock number font.
delay The delay between frames in milliseconds.
hhcolor The color of the hour hand in RGB hexadecimal.
link A URL to load if the applet is clicked.
mhcolor The color of the minute hand in RGB hexadecimal.
ncolor The color of the numbers in RGB hexadecimal.
nradius The radius in pixels at which to draw the clock numbers.
shcolor The color of the second hand in RGB hexadecimal.

For example:

<applet codebase="classes" code="JavaClock.class"
width="150" height="150" >
<param name="bgcolor" value="ffffff">
<param name="border" value="5">
<param name="ccolor" value="dddddd">
<param name="cfont" value="TimesRoman|BOLD|18">
<param name="delay" value="100">
<param name="hhcolor" value="0000ff">
<param name="link" value="http://java.sun.com/">
<param name="mhcolor" value="00ff00">
<param name="ncolor" value="000000">
<param name="nradius" value="80">
<param name="shcolor" value="ff0000">
</applet>

The example parameters above display a clock with a black background, a black and gray dial, red second hand, green minute hand, dark blue hour hand, and black numbers.


View the Source Code: src
Visit the Author's Website: java.sun.com/openstudio/index.html
Email the Author: [email protected].
Go back to the Games Index: Just Java Games!
Hosted by www.Geocities.ws

1