int currentRun = getRunForTab(tabPane.getTabCount(), tabIndex);
int tabCount = tabPane.getTabCount(); int currentRun = getRunForTab(tabCount, tabIndex); int right = w - 1; int bottom = h - 1;
  protected void paintTopTabBorder(int tabIndex, Graphics g, int x, int y,      int w, int h, int btm, int rght, boolean isSelected)  {    int currentRun = getRunForTab(tabPane.getTabCount(), tabIndex);    if (shouldFillGap(currentRun, tabIndex, x, y))      {        g.translate(x, y);        g.setColor(getColorForGap(currentRun, x, y));        g.fillRect(1, 0, 5, 3);        g.fillRect(1, 3, 2, 2);        g.translate(-x, -y);      }        if (isSelected)    {      g.setColor(MetalLookAndFeel.getControlHighlight());      g.drawLine(x + 1, y + h, x + 1, y + 6);            g.drawLine(x + 1, y + 6, x + 6, y + 1);      g.drawLine(x + 6, y + 1, x + w - 1, y + 1);    }    g.setColor(MetalLookAndFeel.getControlDarkShadow());    g.drawLine(x, y + h - 1, x, y + 6);    g.drawLine(x, y + 6, x + 6, y);    g.drawLine(x + 6, y, x + w, y);    g.drawLine(x + w, y, x + w, y + h - 1);  }