Overview

PaintApp and ClockApplet are graphics-only applets. Sure, lines, rectangles, and polygons—and colors—can produce visually stunning applets, but sooner or later, you'll want to use text. "Sooner" sounds fine (right?), so our next applet is going to be a rather simple, customizable scrolling text marquee. The messages that scroll by can be clicked on to jump to pages elsewhere on the World Wide Web.

Start!

Download!

Demonstration

Here is a demonstration of Marquee:

 Sorry, your browser doesn't support Java, or you disabled it. 

In This Section

1 The Applet Skeleton
Applet initialization, thread functions, mouse events, color fields
2 Fonts
Font parameters, font metrics terms, finding characters in strings
3 Drawing the Error Message
Drawing centered text
4 Message Initialization
Declaring custom classes, message parameters, string comparison
5 Marquee's Messages
The break and continue keywords, scrolling messages
6 Hyperlinks
The applet context, displaying a URL in the browser
Marquee Listing
Marquee Test Page


1