• Post Reply Bookmark Topic Watch Topic
  • New Topic

Update records using a JTable  RSS feed

 
matthew weeks
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know this is possible, but I'm not sure how. I was wondering how you go about updating records found in a JTable. Any code (preferred) or guidance would be most appreciated.
 
Joe Ess
Bartender
Posts: 9414
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good luck on getting someone to write that code for you. In the mean time, try this: implement TableModelListener in some class and register as a listener with your Table Model. When you get a TableEvent, figure out if values have changed or rows have been added and do the appropriate thing with the corresponding database record.
Oh, and ask Swing questions in the Swing forum.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!