code: public void actionPerformed(ActionEvent event) {
          String cmd = event.getActionCommand();
          if (cmd.equals(CUT)) {
              text.cut();
          } else if (cmd.equals(COPY)) {
              text.copy();
          } else if (cmd.equals(PASTE)) {
              text.paste();
          }
      }
docs: handle cut, copy and paste