Ejemplo n.º 1
0
  public void init() {
    List actionList = new List(3); // makes a list to choose from
    actionList.add("wave");
    actionList.add("think");
    actionList.add("write");

    actionList.addActionListener(this); // tell Java to listen for user input
    add(actionList);

    myDuke = new Dukes(); // make an instance of Duke
    action = myDuke.getActionImage(); // see what Duke's current action is
  }