Results 1 to 3 of 3
Thread: jtree painting treenodes
- 07-01-2010, 12:14 PM #1
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
jtree painting treenodes
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 greenDefaultMutableTreeNode 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
- 07-01-2010, 12:24 PM #2
Already answered: Swing - TreeNode color problem
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 07-01-2010, 01:40 PM #3
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
Similar Threads
-
Images don't painting
By daniel.henrique in forum New To JavaReplies: 2Last Post: 02-12-2010, 11:48 AM -
Objects painting themselves?
By martypapa in forum Java 2DReplies: 19Last Post: 02-06-2010, 04:08 AM -
painting problem
By hannes in forum New To JavaReplies: 3Last Post: 01-17-2010, 11:44 AM -
JPanel not always painting everything
By ekted in forum AWT / SwingReplies: 0Last Post: 11-26-2009, 11:24 AM -
Move JTree item to another JTree.
By Melki in forum AWT / SwingReplies: 8Last Post: 07-09-2009, 11:59 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks