• Post Reply Bookmark Topic Watch Topic
  • New Topic

displaying child nodes on demand

 
Alan Shiers
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I'm working on a client/server project where the client side app has a JTree. I am trying to set up a TreeModel so that it retrieves from the server app the names of the child nodes of a given parent node when the treeWillExpand(TreeExpansionEvent tee) od gets triggered. So far I've accomplished this. In my TreeModel class I have a od called:
ReceiveChildrenFromServer(DefaultTreeNode parent, String ParentsWholePath, DataInputStream input)
This od does what it is supposed to, however, once it has populated the parent node, I expected the JTree to display the nodes. This is not happening. Can someone please explain how I get the JTree to then display the child nodes.
Thanks,
Alan
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you need to fire a model change event.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!