if (isSelected)
g.translate(x, y);   boolean isOcean = MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme; Color oceanSelectedBorder = UIManager.getColor("TabbedPane.borderHightlightColor"); if (isOcean && isSelected) { g.setColor(oceanSelectedBorder); } else { g.setColor(darkShadow); }  g.drawLine(1, bottom - 5, 6, bottom);  g.drawLine(6, bottom, right, bottom);  int lastIndex = lastTabInRun(tabCount, currentRun); if (tabIndex == lastIndex) { g.drawLine(right, 0, right, bottom); }  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); } }   g.setColor(isSelected ? selectHighlight : highlight);  g.drawLine(1, bottom - 6, 6, bottom - 1);  g.drawLine(1, 0, 1, bottom - 6);  int firstIndex = tabRuns[currentRun]; if (tabIndex == firstIndex && tabIndex != tabRuns[runCount - 1]) { if (tabPane.getSelectedIndex() == tabRuns[currentRun + 1])
  protected void paintBottomTabBorder(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, h - 5, 3, 5);        g.fillRect(4, h - 2, 2, 2);        g.translate(-x, -y);      }        if (isSelected)    {      g.setColor(MetalLookAndFeel.getControlHighlight());      g.drawLine(x + 1, y, x + 1, y + h - 7);            g.drawLine(x + 1, y + h - 7, x + 7, y + h - 1);    }    g.setColor(MetalLookAndFeel.getControlDarkShadow());    g.drawLine(x, y, x, y + h - 7);    g.drawLine(x, y + h - 7, x + 6, y + h - 1);    g.drawLine(x + 6, y + h - 1, x + w, y + h - 1);    g.drawLine(x + w, y + h - 1, x + w, y);  }