Originally posted by preeth:
[B]Hi ,
I wrote a program to access records from the database and display records in a tree structure.I was able to do only up to one level.Even though the code works fine the higher level retrieves only one record but the sub level for the first record higher level retrieves all records.The same code works fine if I hard code the tree names instead os names retrieved from the resultset.Some how the while loop brace is creating this problem.Could anybody suggest me a method of doing this.
my code :
[This message has been edited by Jim Yingst (edited August 29, 2000).][/B]
Originally posted by Aruna Devi:
Hi,
I am trying to set different color for specific nodes in a JTree based on certain conditions.
When I browsed thru lot of sun tutorials and others, I came across TreeCellRenderer class.
I created a DefaultTreeCellRenderer object and attached to the tree through <treeobject>.setCellRenderer( renderer object ).
Then I have put the condition and depending on that I have used the setTextNonSelectionColor() method to try to the change the color. But then this method changes the color for all nodes made later and not for the specific node only.
Please throw some light on this issue.
I would greatly appreciate the help.
Thanks,
Aruna