• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JTable JTextField value

 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Is there a simple way to get the original value from the JTextField before the user updated it? If the cell contains a value of 10 and then the user updates the value to 35, how can I get back the 10? I'm guessing I have to store the original value before the user edits the cell?

Thanks for everyone's feedback.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First you should be clear where 10 is actually stored. If 10 is in database you can fetch the value from the database and you can compare it with the updated value in textfield. If you 10 is generated at run time you have to store the 10 in a variable before updating.
 
Shannon Sims
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Naga for your reply. The value is stored in the database, however I was hoping that perhaps JTextField or it's super had some functionality that stores the previous value. I've decided to store the value before the user edits it.

Thanks again.
-Shannon
reply
    Bookmark Topic Watch Topic
  • New Topic