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.
  
  -  
	init()
   -  Initialize the applet.
  
 -  
	paint(Graphics)
   -  Update the window, erasing things from their old positions
and painting them anew at their current positions.
  
 -  
	run()
   -  The main loop for the main thread.
  
 -  
	start()
   -  start - Whenever a user visits our page, Applet calls
this.
  
 -  
	stop()
   -  Stop this thread.
 
  
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
  
 
 
stop
  public void stop()
  -  Stop this thread.
  
    -  Overrides:
    
 -  stop in class Applet
  
 
 
run
  public void run()
  -  The main loop for the main thread.
 
init
  public void init()
  -  Initialize the applet. Resize and show.
  
    -  Overrides:
    
 -  init in class Applet
  
 
 
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