• Post Reply Bookmark Topic Watch Topic
  • New Topic

DefaultListModel & JTable; how to sync the items in the DefaultListModel

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jtable with items in it

example
name date age

Peter 01-jan-43 62
Ron 03-nov-73 32

when double clicking the name( eg peter), a new window pops up contains all relevent info of the user.

I added a sorter and when sorting the table it comes in the correct-wanted order, however, when double clicking the item - the wrong window pops up.

I take it the DefaultListModel is not synchronized with the tables elements.
Q: how to correct the DefaultListModel once the table has been sorted so it will be in sync with the jtable.


thanks
peter
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!