setBorderSelectionColor(UIManager.getLookAndFeelDefaults().getColor( "Tree.selectionBorderColor"));
if (tree.getLeadSelectionPath() == null || (tree.getLeadSelectionPath().getLastPathComponent()).equals(val)) setBorderSelectionColor(UIManager.getLookAndFeelDefaults(). getColor("Tree.selectionBorderColor")); else setBorderSelectionColor(null);
	public Component getTreeCellRendererComponent(JTree tree, Object val,                                                boolean selected,                                                boolean expanded, boolean leaf,                                                int row, boolean hasFocus)	{		if (leaf)			setIcon(getLeafIcon());		else if (expanded)			setIcon(getOpenIcon());		else			setIcon(getClosedIcon());      setText(val.toString());      this.selected = selected;      this.hasFocus = hasFocus;      setHorizontalAlignment(LEFT);      setOpaque(false);      setVerticalAlignment(TOP);      setEnabled(true);      super.setFont(UIManager.getLookAndFeelDefaults().getFont("Tree.font"));		if (selected) 		{			super.setBackground(getBackgroundSelectionColor());			setForeground(getTextSelectionColor());        setBorderSelectionColor(UIManager.getLookAndFeelDefaults().getColor(                                                                            "Tree.selectionBorderColor"));		}		else		{			super.setBackground(getBackgroundNonSelectionColor());			setForeground(getTextNonSelectionColor());        setBorderSelectionColor(null);		}		          return this;	}