if (selected)
{
panel.setBackground(getBackgroundSelectionColor());
label.setForeground(getTextSelectionColor());
}
else
{
panel.setBackground(getBackgroundNonSelectionColor());
label.setForeground(getTextNonSelectionColor());
}
panel.setComponentOrientation(tree.getComponentOrientation());
return panel;
}
}
return super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
}
}