posted 13 years ago
Hi,
I want to create Tree in which there will be single Parent node and multiple child nodes. I want to create these child node after user click on PLUS sign which is used for Tree Expansion. I can add nodes in JTree using TreeExpansionListener's method treeExpanded. But I have problem in showing PLUS sign with Parent Node. As if childs are not present this sign does not come, it comes after adding first child. So I am thinking of adding dummy child to get this PLUS sign, when user clicks it I will remove dummy child and will add actual childs.
Is there any other better way by which I can show PLUS sign(tree expansion icon) at parent node even if parent does not have any child.
Thanks,
Sham