}
  protected void selectAdjacentRunTab(int tabPlacement, int tabIndex,                                      int offset)  {    int x = rects[tabIndex].x + rects[tabIndex].width / 2;    int y = rects[tabIndex].y + rects[tabIndex].height / 2;    switch (tabPlacement)    {    case SwingConstants.TOP:    case SwingConstants.BOTTOM:      y += offset;      break;    case SwingConstants.RIGHT:    case SwingConstants.LEFT:      x += offset;      break;    }    int index = tabForCoordinate(tabPane, x, y);    if (index != -1)      tabPane.setSelectedIndex(index);  }