Link Details

Link 3381 thumbnail
User 205541 avatar

By jroyce
via mycodepage.blogspot.com
Published: Sep 17 2006 / 20:47

If you have a JTable which is populated from an outside database, you have to take two actions to actually "INSERT" a new record. First, you have to build the SQL INSERT statement and then you have to take that same data and add a new row to your TableModel. Otherwise, your JTable will not refresh.
  • 8
  • 0
  • 3354
  • 663

Comments

Add your comment
User 205541 avatar

jroyce replied ago:

0 votes Vote down Vote up Reply

Now I'd like to figure out how to get the table to refresh based on an update, not an insert. This is probably through an event on the TableModel.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (8)



Voters Against This Link (0)