Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ) ?

like image 467
Damir Avatar asked Apr 13 '11 08:04

Damir


1 Answers

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.

like image 185
dogbane Avatar answered Sep 21 '22 04:09

dogbane