import java.awt.*;
import java.applet.*;

public class ch13ex1 extends Applet {
  TextField t = new TextField(30);
  Button
    b1 = new Button("one"),
    b2 = new Button("two"),
    b3 = new Button("three");
  public void init() {
    add(b1); add(b2); add(b3);
    add(t);
  }
  public boolean action (Event evt, Object arg) {
    if(evt.target.equals(b1))
      t.setText("one");
    else if(evt.target.equals(b2))
      t.setText("two");
    else if(evt.target.equals(b3))
      t.setText("three");
    else return super.action(evt, arg);
    return true;
  }
}
