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

Class chap5.ch5_fig10

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

public class ch5_fig10
extends Applet
implements Runnable
An applet that displays the same string in two places, one fixed, the other changing at 50ms intervals. Uses the paint method which is very simple, but which should also produce a large amount of flicker.

Method Index

 o init()
Initialize the applet.
 o paint(Graphics)
Update the window, erasing things from their old positions and painting them anew at their current positions.
 o run()
The main loop for the main thread.
 o start()
start - Whenever a user visits our page, Applet calls this.
 o stop()
Stop this thread.

Methods

 o start
  public void start()
start - Whenever a user visits our page, Applet calls this. This is an override of an Applet method. Creates a thread and passes this AgentLauncher into it. Works because we implement the Runnable method.
Overrides:
start in class Applet
 o stop
  public void stop()
Stop this thread.
Overrides:
stop in class Applet
 o run
  public void run()
The main loop for the main thread.
 o init
  public void init()
Initialize the applet. Resize and show.
Overrides:
init in class Applet
 o paint
  public void paint(Graphics g)
Update the window, erasing things from their old positions and painting them anew at their current positions.
Overrides:
paint in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index