• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Regarding JTextField

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author
Posts: 986
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
tadi raja, please use Meaningful Subject Lines when asking questions. "Regarding XYZ" doesn't really help.

Thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic