|
raingod >> resources >> Java >> Software >> Clocks
Clocks
Last updated: 08.05.2002
Java applets to insert animated clocks in your pages. I suspect that we'll rapidly grow very tired of these things, which - until someone implements a Web browser you can wear on your wrist - serve no useful purpose whatsoever. But it was a good learning experiment.
DigitalClockApplet
This applet inserts a digital clock in the page. The appearance of the clock (font, colors etc.) can be controlled through parameters. Inspect the source code for this page to see an example.
|
Default appearance of digital clock. Clock displays local time by default.
|
Variation showing European date, time zone set to 3 hours ahead of Greenwich, and clock face hidden so that clock appears as plain text.
|
AnalogClockApplet
An extension of the clock idea, this time using graphics to draw a crude analog clockface.
|
Default appearance of clock (plus white clockface). Clock displays local time by default.
|
Changing colours, time zone set to two hours behind Greenwich.
|
Both types of clock are based on a ClockApplet class, which is in turn based on the ExtendedApplet class, which provides parameter parsing facilities.
|