Class hamlet.SendButton
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class hamlet.SendButton

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----hamlet.SendButton

public class SendButton
extends Applet
Creates an applet that displays a button on the screen. When that button is pushed, a message is sent to an AppFrame displayed elsewhere on the screen. The class of that frame is specified by the CLASSNAME parameter to the applet, and the message to send is specified by the MESSAGE parameter. For example
  <applet CODE="SendButton.class">
    <PARAM NAME=CLASSNAME VALUE="BlockStacker.BlockStacker">
    <PARAM NAME=MESSAGE VALUE="add">
  </applet>
would send the message add to a frame of class BlockStacker.BlockStacker.

The applet uses the static methods of the AppButton class to communicate with frames of a particular class.

See Also:
AppButton, AppFrame

Constructor Index

 o SendButton()

Method Index

 o action(Event, Object)
When the button is clicked, sends the message to the appropriate frame.
 o init()
Obtains the CLASSNAME and MESSAGE parameters and creates the button which, when will clicked, will send the message.

Constructors

 o SendButton
  public SendButton()

Methods

 o init
  public void init()
Obtains the CLASSNAME and MESSAGE parameters and creates the button which, when will clicked, will send the message.
Overrides:
init in class Applet
 o action
  public boolean action(Event theEvent,
                        Object arg)
When the button is clicked, sends the message to the appropriate frame.
Parameters:
theEvent - Event that triggered the action
arg - Argument associated with the event
Returns:
True if event handled, false otherwise
Overrides:
action in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index