if (path == null) return null;
  public Rectangle getBounds(TreePath path, Rectangle rect)  {    if (dirty)      update();    Object last = path.getLastPathComponent();    NodeRecord r = (NodeRecord) nodes.get(last);    if (r == null)    // This node is not visible.      {        rect.x = rect.y = rect.width = rect.height = 0;      }    else      {        if (r.bounds == null)  {            Rectangle dim = getNodeDimensions(last, r.row, r.depth,                                              r.isExpanded, rect);            r.bounds = dim;          }        rect.setRect(r.bounds);      }    return rect;  } 