Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jtable editing

 
Mike Southgate
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a user updates the contents of a JTable cell, the setValueAt method is not called until a user cicks on a diferent cell. If the user just closes the window without doing anything else first the last update to the jtable is lost. How can this be corrected?
ms
 
Garandi Garandi
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try
Garandi
 
Mike Southgate
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where would I insert that code?
ms
 
Abhik Sarkar
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose it would be in the windowClosing method of a WindowListener on the Frame.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic