Chapter 3: Using Java on Your Pages

index | previous | next

The tinyScroller applet

The documentation for the tinyScroller applet reads:

tinyScroller v0.81 (Java Class)

tinyScroller is another Java class designed to spice up your Web page. tinyScroller will continuously scroll up to 12 lines of text. By incorporating tinyScroller in your Web page, you can maximize content in a very small space. tinyScroller is ideal for Webmasters who need to keep their site visitors notified of ongoing events.

tinyScroller, like tinyFader, is extremely customizable. I've made many of the attributes settable as parameters passed from your HTML. Below, you'll find documented all of the current parameters.

Example HTML:

<applet code="tinyScroller.class" height="150" width="175">
<param name="LINE1" value="In the news:">
<param name="LINE2" value=" Java is becoming the">
<param name="LINE11" value=" the latest destination">
<param name="LINE12" value=" for high-tech employers.">
<param name="BGRED" value="255">
<param name="BGGREEN" value="255">
<param name="BGBLUE" value="255">
<param name="SPACING" value="12">
<param name="DELAY" value="50">
<param name="MAXLINE" value="12">


LINE1-LINE12 (Required) - LINE1 through LINE12 make up the content to be displayed. If you're not using all 12 lines you don't have to define them, but rember to correctly set the MAXLINE parameter.

MAXLINE (Optional) - If you are not using all 12 lines available, make sure to correctly set MAXLINE to the actual number of lines used. I'm suppressing errors so if you choose to scroll more lines than you actually defined you can do so by resetting this value. MAXLINE defaults to 12.

BGRED, BGGREEN, BGBLUE (Optional) - You may set the background color of the applet by passing the one-byte (0-255) RGB (red, green, and blue) component values. The background color defaults to white.

FGRED, FGGREEN, FGBLUE (Optional) - You may set the foreground (font) color for the applet by passing the one-byte (0-255) RGB (red, green, and blue) component values. The foreground color defaults to white.

SPACING (Optional) - You may define the line spacing by passing it as a parameter. SPACING defaults to 12.

DELAY (Optional) - DELAY controls the time interval between shifts in the line positions. Delay defaults to 100 milliseconds.

XPOS (Optional) - XPOS stands for X position; this controls the horizontal position of the lines within the applet. XPOS defaults to five.

BACKGROUND (Optional) - If you wish to use a graphic for the background of the applet, pass the filename here. You may pass a JPG or GIF. Displaying a graphic does, however, impact the speed of the screen update. As a result, you may notice a flicker.

The tinyScroller applet is © Christian Ricci, who may be reached at or via the tinyScroller page.