Make your own free website on Tripod.com

Instructions for using the news ticker applet ...

  1. Copy the .class files to your web directory.
  2. Create a news.txt file containing one line per heading. Use vertical bar characters | to include new lines where appropriate. At the end of the line put a '~' character followed by the URL you want that heading to link to. See the included news.txt file for an example. Save it in the same directory as the applet classes.
  3. Design a graphic for the background of your applet and save it in the same directory as the applet classes.
  4. Include the applet in an HTML page with code similar to the following:

<applet code=NewsTicker.class width=120 height=150 >
<param name=newsfile value="news.txt">
<param name=x value=10>
<param name=y value=25>
<param name=cx value=90>
<param name=cy value=114>
<param name=background value="news.gif">
<param name=bgcolor value="102,102,153">
<param name=textcolor value="0,0,0">
<param name=hilitecolor value="255,0,0">
<param name=frame value="main">
<param name=pause value="true">
</applet>

  1. x, y, cx and cy are the position and size of the clipping rectangle for the news text. The background colour shows through transparent gifs.
  2. textcolor and hilitecolor are optional parameters for setting the text colour.
  3. frame is an optional parameter for setting the frame into which links are loaded.
  4. pause is an optional parameter that tells the applet whether to pause scrolling when each header reaches the top of the window.
  5. I've also included the .java source file for this simple applet so that you can make your own modifications.