How to implement text in JEditorPane has changed

How to implement a method for changing text in JEditorPane (get text for each added or deleted character)?

+5
source share
1 answer

You need to register a document listener with a JEditorPane document, which will be notified of the insertion or deletion of text or a change in text style.

See the Java Tutorial> How to write a document listener for more information about document listeners and document events.

+5
source

All Articles