Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: How to update the table

 
Flavio Nobili
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all,
I would like to make my table reload data records. To do so I've used the following, but it doesn't work. What must I do to reload data when it's changed?

Ragards,
Fl�vio.
 
Ken Krebs
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Flavio,
It's probably because you have defined your own field for an AbstractTableModel in your JTable extension and it's not being listened to. There is no good reason I can think of to define your own model field.
A JTable will automatically register itself with a TableModel if you create the JTable with the TableModel specified in the constructor or by using setModel().
BTW, I didn't bother to extend JTable myself, only AbstractTableModel.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic