Which listener can know that the value of JTextPane is changed?

I would like to know when the content will be changed JTextPane. I implemented a keyboard listener, but it only detects keyboard events. If the user inserts text with the mouse or drags the text inside, then I can not determine the value JTextPane. Which event listener can tell me that the value has JTextPanechanged?

+5
source share
1 answer

you need to look for DocumentListener

+10
source

All Articles