开发者

How to implement in JEditorPane on text changed

开发者 https://www.devze.com 2023-02-25 18:15 出处:网络
How to implement in JEditorPane on text ch开发者_开发问答anged method ( get text on every character added or deleted ) ?You need to register a document listener with the document of the JEditorPane wh

How to implement in JEditorPane on text ch开发者_开发问答anged method ( get text on every character added or deleted ) ?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消