String command = e.getActionCommand();
if (command == CUT) { // We can do this since we're comparing constants.
System.out.println("Got Cut event");
}
else if (command == COPY) {
System.out.println("Got Copy event");
}
else if (command == PASTE) {
System.out.println("Got Paste event");
}