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

Receiver

public class Receiver extends Applet implements ActionListener

Fields Summary
private final String
waitingMessage
private Label
label
Constructors Summary
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent event)

        label.setText(waitingMessage);
    
public java.lang.StringgetAppletInfo()

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


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

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

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