阅读背景:

如何从JTextArea中删除旧文本,以便文档大小不超过阈值? (JAVA)

来源:互联网 

So I wish to output the console to a JTextArea which I can do, however I wish for the text area to be treated like the Eclipse console, and remove old lines once the line count has reached a certain threshold. Such that, once the line count (or character count) has reached a threshold of say, 300, every new line added will delete the first line added meaning that the number of lines (or characters) in the JTextArea's document will never exceed that threshold. How might I do this? Cheers.So I wish to output the console to a JTextArea




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: