FileDocCategorySizeDatePackage
Receiver.javaAPI DocExample982Tue Dec 12 18:57:30 GMT 2000None

Receiver

public class Receiver extends Applet

Fields Summary
private final String
waitingMessage
private Label
label
Constructors Summary
Methods Summary
public booleanaction(java.awt.Event event, java.lang.Object o)

        label.setText(waitingMessage);
        repaint();
        return false;
    
public java.lang.StringgetAppletInfo()

        return "Receiver (named " + getParameter("name") + ") by Kathy Walrath";
    
public voidinit()


       
        add(label);
        add(new Button("Clear"));
        add(new Label("(My name is " + getParameter("name") + ".)", 
                      Label.LEFT)); 
        validate();
    
public voidpaint(java.awt.Graphics g)

        g.drawRect(0, 0, size().width - 1, size().height - 1);
    
public voidprocessRequestFrom(java.lang.String senderName)

        label.setText("Received message from " + senderName + "!");
        repaint();