Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jtree structure update

 
kizgincocuk kizgincocuk
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..
i wanna to update my tree structure after a specific action.I am adding/deleting nodes,but i can't see changes..
thanx..
 
Joe Ess
Bartender
Posts: 9298
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using or extending javax.swing.tree.DefaultTreeModel, invoke fireTreeNodesInserted() on it. That will tell the model that the data has changed and it will fire events off to inform interested parties (i.e. the display). Look at the documentation for other useful event-firing methods.
 
kizgincocuk kizgincocuk
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx ... joe
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic