public void addUndoableAction(UndoableAction action){
  undoStack.push(action);
  redoStack.removeAllElements();
}

public void addUndoableAction ( UndoableAction action ) { undoStack . push ( action ) ; redoStack . removeAllElements ( ) ; }
add a new undoable action .
