int row = y / rowHeight; if (row < 0) row = 0; if (row > getRowCount()) row = getRowCount() - 1;
NodeRecord best = null; NodeRecord r; Enumeration en = nodes.elements();
  public TreePath getPathClosestTo(int x, int y)	{    if (dirty)      update();    // We do not need to iterate because all rows have the same height.    int row = y / rowHeight;    if (row < 0)      row = 0;    if (row > getRowCount())      row = getRowCount() - 1;        if (row < 0)      return null; // Empty tree - nothing to return.        Object node = row2node.get(new Integer(row));    NodeRecord nr = (NodeRecord) nodes.get(node);    return nr.getPath();  } 