Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about modify

 
Richard Phen
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everybody!
I can take the data out from JTable which shows the result search by criteriaFind method. My question is how to use the modify(DataInfo newData) method to book a seat? I mean How to specified the DataInfo's recordNumber? I only can get the values of DataInfo from the JTable.
Help!
 
Robin Underwood
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing you could do is use a custom table model that extends AbstractTableModel, and holds keys as well as the values (that's what I did). Or you could hold record number as a column in the table model, but not display it in the JTable. Or you could use Data's find() method to retrieve the record that matches the first value (probably not a good way to do it). I'm sure there's plenty more ways besides these...
 
Richard Phen
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your clearly answer! I got the idea.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic