if ((currentRun == 0 && tabIndex != 0) || (currentRun > 0 && tabIndex != tabRuns[currentRun - 1]))
if (tabIndex != tabRuns[runCount-1])
  protected void paintBottomTabBorder(int tabIndex, Graphics g, int x, int y,      int w, int h, int btm, int rght, boolean isSelected)  {    int bottom = h - 1;    int right = w - 1;    int tabCount = tabPane.getTabCount();    int currentRun = getRunForTab(tabCount, tabIndex);    // Paint gap if necessary.    if (shouldFillGap(currentRun, tabIndex, x, y))      {        g.translate(x, y);        g.setColor(getColorForGap(currentRun, x, y));        g.fillRect(1, bottom - 4, 3, 5);        g.fillRect(4, bottom - 1, 2, 2);        g.translate(-x, -y);      }        g.translate(x, y);    // Paint border.    boolean isOcean = MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme;    Color oceanSelectedBorder =      UIManager.getColor("TabbedPane.borderHightlightColor");    if (isOcean && isSelected)      {        g.setColor(oceanSelectedBorder);      }    else      {        g.setColor(darkShadow);      }    // Slant.    g.drawLine(1, bottom - 5, 6, bottom);    // Bottom.    g.drawLine(6, bottom, right, bottom);    // Right.    int lastIndex = lastTabInRun(tabCount, currentRun);    if (tabIndex == lastIndex)      {        g.drawLine(right, 0, right, bottom);      }    // Left.    if (isOcean && isSelected)      {        g.drawLine(0, 0, 0, bottom - 5);        if ((currentRun == 0 && tabIndex != 0)            || (currentRun > 0 && tabIndex != tabRuns[currentRun - 1]))          {            g.setColor(darkShadow);            g.drawLine(0, bottom - 5, 0, bottom);          }      }    else      {        if (isOcean && tabIndex == tabPane.getSelectedIndex() + 1)          {            g.setColor(oceanSelectedBorder);          }        if (tabIndex != tabRuns[runCount - 1])          {            g.drawLine(0, 0, 0, bottom);          }        else          {            g.drawLine(0, 0, 0, bottom - 6);          }      }    // Paint highlight.    g.setColor(isSelected ? selectHighlight : highlight);    // Slant.    g.drawLine(1, bottom - 6, 6, bottom - 1);    // Left.    g.drawLine(1, 0, 1, bottom - 6);    int firstIndex = tabRuns[currentRun];    if (tabIndex == firstIndex && tabIndex != tabRuns[runCount - 1])      {        if (tabPane.getSelectedIndex() == tabRuns[currentRun + 1])    {            g.setColor(selectHighlight);          }        else          {            g.setColor(highlight);          }        g.drawLine(1, bottom - 4, 1, bottom);      }    g.translate(-x, -y);  }