• Post Reply Bookmark Topic Watch Topic
  • New Topic

dynamically giving node name in jtree

 
Gagan Kundra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can we give dynamic names to nodes in a jtree. Actually i want to give nodes name from my database.

Please help, it is urgent.

Thanks in advance
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, how do you give it a node name now?

new DefaultMutableTreeNode("Node Name");

Use a variable instead. Creating a JTree from a Database has also been discussed here numerable times. Do a search in this forum and maybe even google it. Lots of good examples out there.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!