TreePath lead = tree.getLeadSelectionPath(); if (lead != null && tree.isPathSelected(lead)) { Rectangle cell = getPathBounds(tree, lead); g.setColor(UIManager.getLookAndFeelDefaults().getColor( "Tree.selectionBorderColor")); g.drawRect(cell.x + rightChildIndent - 4, cell.y, cell.width + 4, cell.height); }
	public void paint(Graphics g, JComponent c)	{		JTree tree = (JTree) c;		TreeModel mod = tree.getModel();      Object root = mod.getRoot();            if (!tree.isRootVisible())         tree.expandPath(new TreePath(((DefaultMutableTreeNode) root)               .getPath()));            paintRecursive(g, 0, 0, 0, 0, tree, mod, root);            if (hasControlIcons())         paintControlIcons(g, 0, 0, 0, 0, tree, mod, root);            TreePath lead = tree.getLeadSelectionPath();      if (lead != null && tree.isPathSelected(lead))      {         Rectangle cell = getPathBounds(tree, lead);           g.setColor(UIManager.getLookAndFeelDefaults().getColor(               "Tree.selectionBorderColor"));         g.drawRect(cell.x + rightChildIndent - 4, cell.y,                cell.width + 4, cell.height);      }	}