![]() |
Word Clock applet |
This example is an applet which displays a clock, in words; it follows the algorithm used in one of the earliest Rexx programs, QTIME, for generating the words.
Here's the source, as a plain ASCII file.
The applet has similarities to the 'Nervous Texxt' applet; it wakes up every minute to redisplay the time. Optional parameters may be supplied to select the font face and size.
The applet is compiled using the same steps as for the 'Hello World' applet. To have the applet displayed in World Wide Web page, you need to
<applet code="WordClock.class" width=400 height=40> <param name=face value="Helvetica"> <param name=size value="20"> </applet>
which sets the maximum size for the window in which the applet will appear, and the face and size at which the clock will appear.
You can then view the page with any Java-enabled browser, or with the
'applet viewer' that comes with the Java Development Kit. If you are
using such program, you should see the applet below here.
For more details on running applets, see the Hello World applet page.
[ NetRexx | IBM home page | Search | Contact IBM | Help | Legal | Privacy ]
This page was created on 27 Nov 1997; it can be found from http://www2.hursley.ibm.com/netrexx/