QUOTE(pbl @ 20 Mar, 2009 - 04:24 PM)

Post the code of your class extending TreeModel
Hi,
I have stored my treemodel into another tree model and used getTreeCellRendrerComponenet to hide leaf nodes from the first tree model,
the part of code goes like this:
Ref_Tree.getTreeCellRendrerComponent(value,leaf,sel.......)
{
if (!leaf)
{
super.getTreeCellRendererComponent(tree,value, sel, expanded,leaf, row, hasFocus);
}
else
{
super.getTreeCellRendererComponent(tree," ", sel, expanded,leaf, row, hasFocus);
}
return this;
}
As you can see , i have assigned null string to "value" in the else statement. This null string appears in the JTree display when i display JTree in left panel(jScroolpane). I want to remove this null string , another problem i face is, i do not want to display expand icon (like '+') when the node has its all children are leaf nodes. you can refer the images which i posted in my last post. Thanks for the help.
This post has been edited by samgajjar: 23 Mar, 2009 - 05:24 AM