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

前端 未结 5 836
旧时难觅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:30

    This tutorial explains the fundamental of the Command Pattern and the undo/redo mechanism for Swing. Hope it helps.

提交回复
热议问题