Posted By:
Sandip_Chitale
Posted On:
Thursday, March 29, 2001 10:15 PM
The tree rows (nodes) are reallyt painted by the TreeCellRenderer
returned component.
Set the foreground of the component returned from the installed
TreeCellRederer's
public Component getTreeCellRendererComponent(JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
which happens to be JLabel in case of
DefaultTreeCellRenderer.
Also please try to read the class documentations and JFC tutorial at -
http://java.sun.com/docs/books/tutorial/books/swing/