Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将一些文本写入JTextArea. 我认为答案是扩展java.io.Writer,但我想在这里给出一个权威的答案;这是正确的做法吗?
JTextArea
java.io.Writer
您可以使用JTextArea.setText(String)andJTextArea.append(String)来执行此操作。
JTextArea.setText(String)
JTextArea.append(String)