public void undo() { try { MethodInvocationManager.invokeMethod( // frame, parentObject, addMethod, addParams); listener.commandActionPerformed(); } catch (Exception e) { System.out.println("Could not undo: " + subtractMethod + " " + e); } }
public void redo() { execute(); listener.commandActionPerformed(); }