File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Writing to a JTextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Writing to a JTextArea" Watch "Writing to a JTextArea" New topic
Author

Writing to a JTextArea

john omeara
Greenhorn

Joined: Nov 12, 2003
Posts: 15
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

Joined: Oct 29, 2001
Posts: 8705
    
    6

tArea.setText("");
tArea.append(stats);


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Writing to a JTextArea
 
Similar Threads
Passed SCJP = 68%
superscript text JTextArea
Redirect System.out.println() to a JTextArea/JTextPane?
Passed SCJD = 91%
JTextArea as a pop up