当前位置: 技术问答>java相关
java如何实现撤消功能
来源: 互联网 发布时间:2017-04-02
本文导语: 如题 | 记事本中的undo 用UndoManager addUndoableEditListener(UndoableEditListener) - Method in class javax.swing.text.AbstractDocument Adds an undo listener for notification of any changes. 或DefaultEditorkit和EditorKit ...
如题
|
记事本中的undo
用UndoManager
addUndoableEditListener(UndoableEditListener) - Method in class javax.swing.text.AbstractDocument
Adds an undo listener for notification of any changes.
或DefaultEditorkit和EditorKit
用UndoManager
addUndoableEditListener(UndoableEditListener) - Method in class javax.swing.text.AbstractDocument
Adds an undo listener for notification of any changes.
或DefaultEditorkit和EditorKit
|
如果是GUI中的撤销(Undo/Redo)的话,javax的swing库中有很好的设计方法,你可以利用。
|
详见command patterns!!!
|
撤消什么啊?