Rectangle rect = new Rectangle();  if (includeSpacing) rect.setBounds(x, y, width, height +y_gap); else rect.setBounds(x, y, width - x_gap, height); return rect;
return cellRect;
  public Rectangle getCellRect(int row,                               int column,                               boolean includeSpacing)  {    int height = getRowHeight(row);    int width = columnModel.getColumn(column).getWidth();    int x_gap = columnModel.getColumnMargin();    int y_gap = rowMargin;    column = Math.max(0, Math.min(column, getColumnCount() - 1));    row = Math.max(0, Math.min(row, getRowCount() - 1));    int x = 0;    int y = (height + y_gap) * row;    for (int i = 0; i < column; ++i)      x += columnModel.getColumn(i).getWidth();    Rectangle rect = new Rectangle();    if (includeSpacing)      rect.setBounds(x, y, width, height +y_gap);    else      rect.setBounds(x, y, width - x_gap, height);    return rect;  }