Make your own free website on Tripod.com
  Java Digital Clock

 



Usage: Use the HTML code below to run the clock applet.

Java Source: Clock2.java

HTML Source:

<applet codebase=/java-bin/dig_clock code=Clock2.class width=275 height=30>
<PARAM NAME="FontFamily" VALUE="Courier">
<PARAM NAME="FontSize" VALUE="20">
<PARAM NAME="FontWeight" VALUE="bold">
<PARAM NAME="DateFmt" VALUE="%c">
<PARAM NAME="BGCol" VALUE="000000">
<PARAM NAME="FGCol" VALUE="ffffff">
</applet>

Notes:

FontFamily

Syntax: <PARAM NAME="FontFamily" VALUE="FamilyName">
where FamilyName is the name of the Font you want to use. Currently, the fonts I can get to work are:

Default: TimesRoman

FontSize

Syntax: <PARAM NAME="FontSize" VALUE="Size">
where Size is the point size you want the font to display in.

Default: 12

FontWeight

Syntax: <PARAM NAME="FontWeight" VALUE="Weight">
where Weight is the weight to apply to the Font. Valid values are: It is not possible to combine the weights.

Default: plain

BGCol

Syntax: <PARAM NAME="BGCol" VALUE="Color">
where Color is the hexadecimal representation of the background color you wish to use.

Format: RRGGBB

Default: 'Netscape Gray' (c0c0c0)

FGCol

Syntax: <PARAM NAME="FGCol" VALUE="Color">
where Color is the hexadecimal representation of the foreground (text) color you wish to use.

Format: RRGGBB

Default: Black (000000)

DateFmt

Syntax: <PARAM NAME="DateFmt" VALUE="Format">
where Format is the format of the string you want to display.

The string can contain text, as well as formatting fields. Formatting fields begin with the '%' character. Example: %H will display the current hour.

The following conversions from date(1) are not supported:

Default: "%a, %B %e %T"

HTML file from http://www.zns.net/oldsite/support/java_digital_clock.html