6

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

Damir
  • 54,277
  • 94
  • 246
  • 365

1 Answers1

6

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.

dogbane
  • 266,786
  • 75
  • 396
  • 414