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, 5, 6, 0);  g.drawLine(6, 0, right, 0);  int lastIndex = lastTabInRun(tabCount, currentRun); if (tabIndex == lastIndex) g.drawLine(right, 1, right, bottom);  int selectedIndex = tabPane.getSelectedIndex(); if (isOcean && tabIndex - 1 == selectedIndex && currentRun == getRunForTab(tabCount, selectedIndex)) { g.setColor(oceanSelectedBorder); } if (tabIndex != tabRuns[runCount - 1]) { if (isOcean && isSelected) { g.drawLine(0, 6, 0, bottom); g.setColor(darkShadow); g.drawLine(0, 0, 0, 5); } else
  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);  }