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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Regarding JTextField" Watch "Regarding JTextField" New topic
Author

Regarding JTextField

tadi raja
Ranch Hand

Joined: Jul 07, 2008
Posts: 109
I have doubt in JTextField, if i enter some text in JTextField and press enter button,it can open one dialog box,if that dialog box closed, and again press the enter button without enter text in textfield,the previous instance in the textfield should be displayed in the dialog box.actually i am passing a String value in the textfield,it should not be cleared. actually i want to clear the String value, not the textfield.getText() value.

thank you in advance
Brian Cole
Author
Ranch Hand

Joined: Sep 20, 2005
Posts: 862
Originally posted by tadi raja:
actually i want to clear the String value, not the textfield.getText() value.


Note that you haven't actually asked a question.

I'll point out, though, that JFormattedTextField has
a distinction between its value and its visible text.
So you could call setText("") and clear the field without
changing the value returned by getValue(). So if that's
really what you want, JFormattedTextField may (or may
not) be helpful to you.


bitguru blog
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

tadi raja, please use Meaningful Subject Lines when asking questions. "Regarding XYZ" doesn't really help.

Thanks.


GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding JTextField
 
Similar Threads
JTextField not updated from dialog box.
getText() method of JTextField returning an emty string
Accessing dynamic Components
Not able to read the value of a component on one JPanel from a different JPanel
Passing data between JFrame & JDialog