Class chap4.ch4_fig8
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class chap4.ch4_fig8

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----chap4.ch4_fig8

public class ch4_fig8
extends Applet
implements Runnable
An applet that finds the other applets that exist within this AppletContext, fights with them to write a string to the browser status line, and writes a string directly into the other applet windows.

Method Index

 o init()
Initialize the applet.
 o mouseDown(Event, int, int)
If the user clicks on the applet, stop it.
 o paint(Graphics)
Paint our window.
 o run()
The main loop for the main thread.
 o start()
Start the main thread for this applet.
 o stop()
Stop this thread.

Methods

 o start
  public void start()
Start the main thread for this applet.
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 paint
  public void paint(Graphics g)
Paint our window. Display a string in this window for each applet we find, then display a string in each of the other applets windows.
Overrides:
paint in class Component
 o mouseDown
  public boolean mouseDown(Event e,
                           int x,
                           int y)
If the user clicks on the applet, stop it.
Returns:
false
Overrides:
mouseDown in class Component
 o init
  public void init()
Initialize the applet. Resize it and give it a name. Make sure that the applet is 'named' via the applet tag.
Overrides:
init in class Applet

All Packages  Class Hierarchy  This Package  Previous  Next  Index