1. How to implment Undo/Redo for a editor coderanch.com |
2. Undo and Redo action in JFormattedTextField forums.oracle.comI have set the Maskformatter to the JFormattedTextField like below MaskFormatter maskFormatter = new MaskFormatter("***.***.***.***"); maskFormatter.setOverwriteMode(true); maskFormatter.setPlaceholderCharacter(' '); maskFormatter.setValidCharacters(" 0123456789"); JFormattedTextField formatText = new JFormattedTextField (maskFormatter); and i have added the undo and redo action to the JFormattedTextField. But it does not work properly. i.e. when we do the undo operation it takes two action ( two time CTRL + Z) ... |