Use the ClockApplet like you would any other graphical applet. For example the following HTML would create an 50x100 applet with a light grey background.
<!--[if !IE]>--> <object classid= "java:net/sourceforge/clockapplet/ClockApplet.class" type="application/x-java-applet" archive="target/clockapplet-0.1-SNAPSHOT.jar" height="50" width="100" > <param name="background.color" value="#F0F0F0" /> <param name="ntp.server" value="pool.ntp.org" /> <!--<![endif]--> <object classid= "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" height="50" width="100" > <param name="code" value="net.sourceforge.clockapplet.ClockApplet" /> <param name="archive" value="target/clockapplet-0.1-SNAPSHOT.jar" /> <param name="background.color" value="#F0F0F0" /> </object> <!--[if !IE]>--> </object> <!--<![endif]-->
Note that the HTML for the example page was largely taken from this tutorial.
Following is a table outlining the available parameters and their defaults.
parameter name | type | default |
---|---|---|
target.timezone | Java TimeZone | America/New_York |
ntp.server | hostname or IP | <Applet Host> |
ntp.server.timeout | socket timeout (millis) | 500 |
ntp.server.interval | NTP request interval (millis) | 2000 |
foreground.color | Java color | BLACK |
background.color | Java color | WHITE |
font.size | time font size (points) | 14 |