Logan Logan - 9 months ago 71
Java Question

Using undo and redo for JTextArea

I am making a text editor using Java swing. I am using JTextArea for the same. I want to know how I can use Undo and Redo functionality in JTextArea as I am not able to use it.


As I understand it, JTextArea has no inherent Undo/Redo functionality built in, but a Google search did find this article which might be helpful.

There apparently exists an Undo Manager in javax.swing which you can hook up to the JTextArea's change events.