How do I implement a simple undo/redo for actions in java?

前端 未结 5 855
旧时难觅i
旧时难觅i 2020-12-15 07:17

I\'ve created an XML editor and I\'m stuck at the last phase: adding undo/redo functionality.

I\'ve only got to add undo/redo for when users add elements, attributes

5条回答
  •  星月不相逢
    2020-12-15 07:47

    Take a look at the Command Pattern, its uses include implementing undo/redo functionality.

提交回复
热议问题