Damir
Damir

Reputation: 56229

How to implement in JEditorPane on text changed

How to implement in JEditorPane on text changed method ( get text on every character added or deleted ) ?

Upvotes: 6

Views: 3690

Answers (1)

dogbane
dogbane

Reputation: 274778

You need to register a document listener with the document of the JEditorPane which will be notified when text is inserted or removed or when the text style changes.

Take a look at Java Tutorial > How to Write a Document Listener for more information about document listeners and document events.

Upvotes: 6

Related Questions