• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing to a JTextArea

 
john omeara
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello i am stuck on a simple problem and was wondering if somebody may know the answer. I have created a JTextarea and want to write some statistics to it. These will change however very regularly and i was wondering how to clear the JTextarea and write the new statistics to it as opposed to appending to the previous ones.
Thanks for your time
john
 
Joe Ess
Bartender
Posts: 9298
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tArea.setText("");
tArea.append(stats);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic