alert treemodel that a listmodel changed



hello,

I have a jtree with a treemodel on one side of a splitpane and a jlist with a listmodel on the other side of the same splitpane. When an entry in the listmodel is deleted I want to alert the treemodel to refresh itself to show that the entry was removed (listmodel shows individual entries of the containers in the treemodel, like a folder/file relationship in a file system).

I have contentsChanged() implemented for the treemodel and have added the jtree as a listdatalistener for the listmodel but yet when I remove an entry in the listmodel the treemodel doesn't automatically refresh and if I attempt to do it manually (by collapsing/expanding the node that had its entry deleted) the app stops responding. Why wouldn't the listmodel be firing the contentsChanged event for the treemodel to catch? Any ideas?

thanks
.



Relevant Pages