Getting raw text from JTextPane

前端 未结 4 1688
粉色の甜心
粉色の甜心 2020-12-16 05:24

In my application, I use a JTextPane to display some log information. As I want to hightlight some specific lines in this text (for example the error messages),

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-16 05:59

    No need to use the ParserCallback. Just use:

    textPane.getDocument().getText(0, textPane.getDocument().getLength()) );
    

提交回复
热议问题