Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / August 2005

Tip: Looking for answers? Try searching our database.

getting rid of text in TextArea

Thread view: 
Frances - 26 Aug 2005 20:13 GMT
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
Steve W. Jackson - 26 Aug 2005 20:19 GMT
> how do you dynamically get rid of text in a TextArea?
>
[quoted text clipped - 5 lines]
>
> Frances

RTFM.  The AWT TextArea and Swing JTextArea both support a setText()
call to do what you want.
Signature

Steve W. Jackson
Montgomery, Alabama

Thomas Fritsch - 26 Aug 2005 20:31 GMT
> how do you dynamically get rid of text in a TextArea?
>
[quoted text clipped - 5 lines]
>
> 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.

Signature

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

Frances - 26 Aug 2005 20:50 GMT
>>how do you dynamically get rid of text in a TextArea?
>>
[quoted text clipped - 10 lines]
> 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..


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.