[Jeff Lee's Homepage] [Java index]

LED Banner Applet

      If you have a Java-enabled browser, you should see two instances of the Banner class above. (Yes, I know, it's a highly original name. So sue me.) If you don't see it, look at at the top of my homepage for a static example of what it can look like.

      The applet is designed to be highly flexible. It accepts any number of strings to display, and the background colour, "on" and "off" LED colours, and rate of scrolling can be specified in the applet parameters. If these parameters are not specified, it defaults to bright/dim cyan on a black background, with 300 milliseconds pause between each iteration.

      The applet is self-contained; it does not need to load any bitmaps from its codebase directory. All bitmaps are constructed on the fly, but only when they are needed -- if none of your strings use the letter "X", the program never creates an "X" bitmap.

      Below is the applet's parameter syntax. The Java source can be viewed by clicking here. (With the advent of Java decompilers like Mocha, it's pointless to try and keep source code a secret. Why fight it?) The class file is available through this link.

datax
The data parameters contain the text to display. They should be numbered contiguously starting from 1 (data1, data2, data3, and so forth); the program will cycle through them continuously. The parameter value may contain any ASCII character from 32 (space) through 126 (tilde). Character 127 may also be used; it displays as a checkerboard. High-ASCII characters are not currently supported, primarily because I can't find room for the diacriticals on upper-case characters.

bgColor
The bgColor parameter specifies the background colour. It takes a hexadecimal value in the form rrggbb, and may range from 000000 to FFFFFF. The parameter is not case-sensitive. The default value is 000000.

onColor
The onColor parameter specifies the colour of LEDs which are lit. Its parameter is another hexadecimal RGB value (see bgColor above). The default value is 00FFFF.

offColor
The offColor parameter specifies the colour of LEDs which are unlit. Its parameter is another hexadecimal RGB value (see bgColor above). The default value is 005C5C.

Delay
The Delay parameter indicates the number of milliseconds to sleep between iterations. Specifying a delay time of zero (0) is disallowed (if zero is specified, it will set the value to 300). The default value is 300.

      To illustrate the parameters, below is the code used to display the applets at the top of the page:


   <applet code="Banner.class" height=32 width=584>
     <param name="data1" value="This is an example of the LED Banner applet.">
     <param name="bgColor"  value="FFFFFF">
     <param name="onColor"  value="000000">
     <param name="offColor" value="C0C0C0">
     <param name="Delay"    value="250">
   </applet>
   <br clear=all>
   <applet code="Banner.class" height=32 width=278>
     <param name="data1" value="So is this.">
     <param name="data2" value="It's just smaller.">
     <param name="bgColor"  value="000000">
     <param name="onColor"  value="00FF00">
     <param name="offColor" value="006000">
     <param name="Delay"    value="600">
   </applet>