int lo = Math.min(index1, index2); int hi = Math.max(index1, index2); Rectangle lobounds = new Rectangle(0, convertRowToY(lo), cellWidth, getRowHeight(lo)); Rectangle hibounds = new Rectangle(0, convertRowToY(hi), cellWidth, getRowHeight(hi));
int minIndex = Math.min(index1, index2); int maxIndex = Math.max(index1, index2); Point loc = indexToLocation(list, minIndex); Rectangle bounds = new Rectangle(loc.x, loc.y, cellWidth, getRowHeight(minIndex));
  public Rectangle getCellBounds(JList l, int index1, int index2)  {    maybeUpdateLayoutState();    if (l != list || cellWidth == -1)      return null;    int lo = Math.min(index1, index2);    int hi = Math.max(index1, index2);    Rectangle lobounds = new Rectangle(0, convertRowToY(lo), cellWidth,                                       getRowHeight(lo));    Rectangle hibounds = new Rectangle(0, convertRowToY(hi), cellWidth,                                       getRowHeight(hi));    return lobounds.union(hibounds);  }