currRun = getNextTabRun(currRun);
  public int tabForCoordinate(JTabbedPane pane, int x, int y)  {    Point p = new Point(x, y);    int tabCount = tabPane.getTabCount();    int currRun = 1;    for (int i = 0; i < runCount; i++)      {        int first = lastTabInRun(tabCount, getPreviousTabRun(currRun)) + 1;        if (first == tabCount)          first = 0;        int last = lastTabInRun(tabCount, currRun);        for (int j = first; j <= last; j++)          {            if (getTabBounds(pane, j).contains(p))              return j;          }        currRun = getNextTabRun(currRun);      }    return -1;  }