• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Repaint the JTree  RSS feed

 
Rani Vish
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I have written an application, in which i want ,if i open any file the Jtree(In left hand side) should repaint with the given values which is passed during the opening that file ,initially the tree contain only one node,How can i repaint the tree i haven't used any listener ,i just want that when ever i open any file the tree should automatically repaint with the information related to the file ,How can i do this ,Please reply fast its very urgent
 
Anand Loni
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

If r u using DefaultTreeModel as ur tree model, then just call
model.reload().

Hope this will work for u.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!