}
  protected void paintRow(Graphics g, Rectangle clipBounds, Insets insets,                          Rectangle bounds, TreePath path, int row,                          boolean isExpanded, boolean hasBeenExpanded,                          boolean isLeaf)  {    boolean selected = tree.isPathSelected(path);    boolean hasIcons = false;    Object node = path.getLastPathComponent();        if (tree.isVisible(path))      {        if (!validCachedPreferredSize)          updateCachedPreferredSize();                paintExpandControl(g, clipBounds, insets, bounds, path, row,                           isExpanded, hasBeenExpanded, isLeaf);                if (row != 0)        bounds.x += gap;        bounds.width = preferredSize.width + bounds.x;        if (editingComponent != null && editingPath != null && isEditing(tree)            && node.equals(editingPath.getLastPathComponent()))          {                rendererPane.paintComponent(g, editingComponent.getParent(), null,                                        bounds);          }        else          {            TreeCellRenderer dtcr = tree.getCellRenderer();            if (dtcr == null)              dtcr = createDefaultCellRenderer();                        Component c = dtcr.getTreeCellRendererComponent(tree, node,                                                            selected,                                                            isExpanded, isLeaf,                                                            row,                                                            tree.hasFocus());            rendererPane.paintComponent(g, c, c.getParent(), bounds);          }      }  }