Пример #1
0
  /** This method performs actions in response to the drinks display button being pressed. */
  public void actionPerformed(ActionEvent e) {
    Button btn;
    String cmd;
    int idx;

    btn = (Button) e.getSource();
    cmd = btn.getActionCommand();
    idx = Integer.parseInt(cmd);

    mCtrl.displayDrinks(idx);
  }