Using undo and redo for JTextArea

后端 未结 5 981
一向
一向 2021-01-04 12:33

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

5条回答
  •  天命终不由人
    2021-01-04 12:44

    Its been a while since I did this and I dont recall the details, but here is a link with some info: http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html

    Scroll down to the section titled "Listening for Changes on a Document" to get started.

提交回复
热议问题