• Post Reply Bookmark Topic Watch Topic
  • New Topic

Tree expansion null pointer

 
jack nick
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Have created a tree having an object as the node of the tree. Done this by extending the DefaultMutableTreeNode. Everything seems to work find except that I do get a nullpointer exception if I click on the + sign for expansion. This does not hamper the other part of my code but nevertheless would like to get rid of this. Could anybody advice as to why this is happening.
Thanks
Jack
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What TreeModel are you using? Could you paste some code that shows how you build up your tree and add the nodes?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!