Binary Clock Applet

I have seen a physical version with LEDs and I loved it. It says Discovery Channel™ on it, so I assume it came from there. I liked it so much that I made one in Java™. It displays the time in six columns of four rows each. Each column represents a decimal digit, 0-9. Thus this display:
      X    
          X
        X X
X X X X X X
represents 11:19:37, or 11:19 and 37 seconds. This clock does not display am or pm, but it uses local time.

In case you've forgotten (or never knew) the binary numbers, here is a table of the binary numbers from zero to nine:
0 1 2 3 4 5 6 7 8 9
0 0 0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 1 0 0
0 0 1 1 0 0 1 1 0 0
0 1 0 1 0 1 0 1 0 1

Unlike the above tables, if the applet is working properly, there should be no "borders" between the rows and columns. This zip file contains all the source, images, etc.

Here is the applet:

Your browser is completely ignoring the <APPLET> tag!

If the applet doesn't appear, you may need the java plugin, which is available from Sun (for free) at this location.

Use of the applet

You might want to play around with this applet. The zip file, mentioned above, contains all the pieces, but you may want only the jar file and this page. If you modify this page for "local" use, the one thing you need to keep is the applet tag:
<applet code="com.palserv.clock.BinaryClockApplet.class"
		archive="clock.jar"
		width="300" height="200">
Your browser is completely ignoring the &lt;APPLET&gt; tag!
</applet>
The applet can also be "customized" using the param tag. The param names and what they mean are:
NameTypeMeaning
background color the background color of each Bit.
foreground_zero color the color of the circle for a "zero" Bit.
foreground_one color the color of the circle for a "one" Bit.
outline color the color of the line around the circle.
height integer the height (in pixels) of each Bit.
width integer the width (in pixels) of each Bit.
radius integer the radius (in pixels) of the circle.
For "color" types, the value must be specified as three numbers from zero to 255 separated by asterisks. The three numbers correspond to light values for Red, Green and Blue. Thus to specify a background of red, you would code:
<param name="background" value="255*0*0">
For "integer" types, the value must be specified as a number. First, the size of the applet (which is controlled by the height and width attributes of the applet tag) should be related to the size of the Bits. There are four rows of six columns of Bit objects. If the applet size is too large, you may see some other color peeking out from around the edges of the Bit objects. If the applet size is too small, you may see some compression of the Bit images. You may have to play with the sizes to get the effect you want.