[英]How to write directly to a JTextArea?
I want to write some text into a JTextArea
. 我想将一些文本写入
JTextArea
。 I think the answer is to extend java.io.Writer
, but I'd like an authoritative answer here; 我认为答案是扩展
java.io.Writer
,但我想在这里提供权威的答案; is that the right thing to do? 那是正确的事吗?
您可以只使用JTextArea.setText(String)
和JTextArea.append(String)
来做到这一点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.