f



getting rid of text in TextArea

how do you dynamically get rid of text in a TextArea?

(no way of doing what in JS you would do like this

       textArea.value = "";  ???

thank you..

Frances
0
Frances
8/26/2005 7:13:26 PM
comp.lang.java.gui 8286 articles. 0 followers. Post Follow

3 Replies
384 Views

Similar Articles

[PageSpeed] 22

In article <430f6970$0$18645$14726298@news.sunsite.dk>,
 Frances <fdr58@yahoo.com> wrote:

> how do you dynamically get rid of text in a TextArea?
> 
> (no way of doing what in JS you would do like this
> 
>        textArea.value = "";  ???
> 
> thank you..
> 
> Frances

RTFM.  The AWT TextArea and Swing JTextArea both support a setText() 
call to do what you want.
-- 
Steve W. Jackson
Montgomery, Alabama
0
Steve
8/26/2005 7:19:02 PM
"Frances" <fdr58@yahoo.com> wrote:
> how do you dynamically get rid of text in a TextArea?
>
> (no way of doing what in JS you would do like this
>
>       textArea.value = "";  ???
>
> thank you..
>
> Frances
There is a method doing exactly what you want. Learn to read the API spec.
Look through 
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTextArea.html#method_summary
and don't forget the inherited methods (of JTextComponent) just below.

-- 
"TFritsch$t-online:de".replace(':','.').replace('$','@')


0
Thomas
8/26/2005 7:31:37 PM
Thomas Fritsch wrote:
> "Frances" <fdr58@yahoo.com> wrote:
> 
>>how do you dynamically get rid of text in a TextArea?
>>
>>(no way of doing what in JS you would do like this
>>
>>      textArea.value = "";  ???
>>
>>thank you..
>>
>>Frances
> 
> There is a method doing exactly what you want. Learn to read the API spec.
> Look through 
> http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTextArea.html#method_summary
> and don't forget the inherited methods (of JTextComponent) just below.
> 
thank you very much, I HAD looked in javadocs..  didn't know could do 
setText("") and it would get rid of what is already there... thank you..

0
Frances
8/26/2005 7:50:40 PM
Reply: