Hello
in my code
getTreeCellRendererComponent
paints the tree
the aim to detect the leaf node ( which i did ) and set its color to say for eg green ( this also works ) now i want to traverse the upto the top of the tree i.e with
After this i want to set the parent node also to greenQuote:
DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
DefaultMutableTreeNode parent = (DefaultMutableTreeNode) node.getParent();
// code to set the parent to GREEN
setForeground(Color.GREEN);
I am not able to get the syntax for that in java
Please help
Kmm
