Java Scroller instructions

Background

This scroller is free to download and use on your website. It would be nice to link to my website if you use it.
You can download a simple example including the scroller.class file and an example HTML caller page from here (5.64k)

How it was written

The applet was written and compiled with SUN JDK 1.3. It does not use the Swing graphics library. Standard Java restrictions apply. If the picture is in another directory, use the codebase element of the applet tag to specify that directory. Ensure scroller.class is in the same directory as the picture. Source code available on request.

Example

Parameters

The parameter names, their purpose and acceptable values are shown below:

width
Example value: 320
Available values: Any positive integer.
Purpose: Used to specify the width of the scroll area.
Status: Mandatory applet attribute.

height
Example value: 64
Available values: Any positive integer.
Purpose: Used to specify the height of the scroll area.
Status: Mandatory applet attribute.

"FONTNAME"
Example value: "SansSerif"
Available values: This must be a font listed in the fonts.properties file and it must be accessible to the Java Virtual Machine. Standard available Microsoft Windows VM fonts are: Dialog, SansSerif, Serif, Monospaced, Helvetica, TimesRoman, Courier, DialogInput and ZapfDingbats.
Purpose: Specifies the font to be use for the scrolling text.
Status: Mandatory.

Notes:
These are normally mapped to True-Type fonts in the fonts.properties file please note that fonts are platform and character set dependent. This is case sensitive.

"FONTSIZE"
Example value: "32"
Available values: Any positive integer.
Purpose: To control the size of the font. The font is centred vertically in the available space.
Status: Mandatory.

"FONTSTYLE"
Example value: "plain"
Available values: plain, bold, italic or bold+italic. Case insensitive.
Purpose: To control the appearance of the font.
Status: Mandatory.

"TEXT"
Example value: "This is a test..."
Acceptable values: Any non-zero length string.
Purpose: Specifies the scrolling message.
Status: Mandatory.

"SPEED"
Example value: "2"
Acceptable values: Any positive integer.
Purpose: Specifies the number of pixels by which the scroller moves each frame.
Status: Mandatory.

"TEXTCOLOR"
Example value: "ffffff" (white)
Acceptable values: Any red, green, blue colour value.
Purpose: Specifies the text (ink) colour.
Status: Mandatory.

"BGCOLOR"
Example value: "000000" (black)
Acceptable values: Any red, green, blue colour value.
Purpose: Specifies the background (paper) colour. This defines the background colour which is used when no picture is specified.
Status: Mandatory.

"PICTURE"
Example value: "image.gif"
Acceptable values: Any valid picture.
Purpose: This picture is tiled by the applet and is a static background to the scroller.
Status: Optional.

Back to index.