Joseph Weissman
Joseph Weissman

Reputation: 5717

How to write directly to a JTextArea?

I want to write some text into a JTextArea. I think the answer is to extend java.io.Writer, but I'd like an authoritative answer here; is that the right thing to do?

Upvotes: 2

Views: 11742

Answers (1)

tangens
tangens

Reputation: 39753

You can just use JTextArea.setText(String) and JTextArea.append(String) to do this.

Upvotes: 6

Related Questions