Class chap5.ch5_fig12
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class chap5.ch5_fig12

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----chap5.ch5_fig12

public class ch5_fig12
extends Applet
implements Runnable
A Ticker applet, runs a String through a rectangular box as if it were a stock-style-ticker.

Constructor Index

 o ch5_fig12()

Method Index

 o init()
Initialize the applet.
 o run()
The Thread run method.
 o start()
The applet start method.
 o stop()
The applet stop method.

Constructors

 o ch5_fig12
  public ch5_fig12()

Methods

 o start
  public void start()
The applet start method. If there's no thread, make one and pass us in, otherwise, do nothing.
Overrides:
start in class Applet
 o stop
  public void stop()
The applet stop method. If theres a thread, set it to null and that will break us out of the thread.run method.
Overrides:
stop in class Applet
 o run
  public void run()
The Thread run method. Start the ticker in it's own thread, then sit in a loop sleeping for 1 second until we get killed.
 o init
  public void init()
Initialize the applet. Resize and load images.
Overrides:
init in class Applet

All Packages  Class Hierarchy  This Package  Previous  Next  Index