aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes clear JTextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "clear JTextArea" Watch "clear JTextArea" New topic
Author

clear JTextArea

iyappan sankaran
Ranch Hand

Joined: Aug 11, 2003
Posts: 58
how to clear the content of a JTextArea.
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
setText("") ?


SCJP 1.4, www.gsi3d.org.uk
Amit Ghai
Ranch Hand

Joined: Mar 24, 2004
Posts: 35
The method clear() Clears the content of the JTextArea.


Reasonable people adapt themselves to the world. Unreasonable people attempt to adapt the world to themselves. All progress, therefore, depends on unreasonable people.
iyappan sankaran
Ranch Hand

Joined: Aug 11, 2003
Posts: 58
is it a method called clear()?
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
I don't think clear() exists as a method

have you tried my suggestion?
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Originally posted by Amit Ghai:
The method clear() Clears the content of the JTextArea.


No it doesn't. There is no method clear() for the JTextArea, uses Ben's suggestion setText("");
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: clear JTextArea
 
Similar Threads
dealing with setting up text areas
Writing to a JTextArea
Java 1.5 StringBuffer/StringBuilder
clear JTextArea
Creating A 'Create Your Own Adventure' Game In Java