File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable JTextField value

 
Shannon Sims
Ranch Hand
Posts: 197
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Naga Malleshwararao
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • 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: 197
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic