Marquee Project (Extra Credit Assignment due 12/7)

A marquee is a text field and a thread. The thread constantly scrolls the contents of the text field. Java doesn't allow multiple inheritance, so you'll have to implement the runnable interface (see the text or the online tutorial):

class Marquee extends TextField implements Runnable { ... } Because Java strings are not mutable (i.e., they're constants), you may want to keep the scrolling message in a StringBuffer (see your online documentation). You marquee should provide methods to allow clients to fetch and change the message and scrolling speed, but not simultaneously.

A marquee panel contains a marquee, pause and resume buttons, and a scrollbar that allows users to adjust the scrolling speed:

class MarqueePanel extends Panel { ... } Users can type new messages directly into the marquee.

Build an applet with at least one marquee panel similar to this one:

Your applet should pause the scrolling when the user moves off the web page, and resume it when the user moves back onto the web page.

You can find a sample at

http://www.mathcs.sjsu.edu/faculty/pearce/java1/threads/marquee/marquee.html Either use your applet viewer or a JDK 1.1 enabled browser.