• Post Reply Bookmark Topic Watch Topic
  • New Topic

Update records using a JTable

 
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: 9372
11
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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!