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 about JTextField Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "about JTextField" Watch "about JTextField" New topic
Author

about JTextField

fei long
Ranch Hand

Joined: Apr 04, 2002
Posts: 48
Hi, i have a simple question about JTextField. Is there a method I can use to delete the contents previously typed in JTextField, here I add a action listener in this text field. What i want is after i press enter i want the text in field to be deleted so that i can just enter another text again.
thanks.
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
setText("")
fei long
Ranch Hand

Joined: Apr 04, 2002
Posts: 48
thanks a lot.
 
jQuery in Action, 2nd edition
 
subject: about JTextField
 
Similar Threads
Tab Key Binding JTextField
Acheiving Focus using EnterKey
Problem with JTextField
Help needed
JText