• Post Reply Bookmark Topic Watch Topic
  • New Topic

refresh tree

 
mouna chabane
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, want to add a button who refresh the tree the problem that i have not "DefaultTreeModel" in my class fir do this and i try this jtree.updateUI();
but not work please help
 
Darryl Burke
Bartender
Posts: 5155
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi mouna, and welcome to the Ranch!

A correctly designed TreeModel will propagate its changes to the tree, without need of external code to initiate a refresh. In your application, what does it mean to reload the model?

For us to understand your problem better, you will need to provide more detail.
 
mouna chabane
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi thank's for reply.When I want to add ( delete ) new node to the Jtree is not refreshed.here the code who disply the tree:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!