Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable issue  RSS feed

 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,
How to find only the affected rows in my Jtable.
I don't want to save all my rows back to database,i need to save only rows whose datas are changed.
thanks,
regards,
silva.
 
Brett Spell
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Selvas,
If I understand correctly, you've created a JTable with editable cells and you want to be able to find out which cells (or rows) have been edited / modified. There's no built-in facility that does this, but you should be able to modify your TableModel implementation easily enough to provide the functionality. Just create a collection object (e.g., an ArrayList) that contains a list of indices of rows that have been modified and add an entry to the list whenever your model's setValueAt() method is called.
------------------
Brett Spell
Author, Professional Java Programming
 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Brett ,
thanks for this imm reply.
regards,
silva
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!