if (isSelected)
g.translate(x, y); int bottom = h - 1; int right = w - 1;  int tabCount = tabPane.getTabCount(); int currentRun = getRunForTab(tabCount, tabIndex); int firstIndex = tabRuns[currentRun];   if (tabIndex != firstIndex) { Color c; if (tabPane.getSelectedIndex() == tabIndex - 1) c = UIManager.getColor("TabbedPane.tabAreaBackground"); else c = UIManager.getColor("TabbedPane.unselectedBackground"); g.fillRect(right - 5, 0, 5, 3); g.fillRect(right - 2, 3, 2, 2); }   g.setColor(isSelected ? selectHighlight : highlight);   g.drawLine(right - 6, 1, right - 1, 6);  g.drawLine(0, 1, right - 6, 1);  if (! isSelected) { g.drawLine(0, 1, 0, bottom); }   boolean isOcean = MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme; Color oceanSelectedBorder = UIManager.getColor("TabbedPane.borderHightlightColor"); if (isOcean && isSelected) { g.setColor(oceanSelectedBorder); } else
  protected void paintRightTabBorder(int tabIndex, Graphics g, int x, int y,      int w, int h, int btm, int rght, boolean isSelected)  {    if (isSelected)    {      g.setColor(MetalLookAndFeel.getControlHighlight());      g.drawLine(x, y + 1, x + w - 7, y + 1);            g.drawLine(x + w - 7, y + 1, x + w - 1, y + 7);    }    g.setColor(MetalLookAndFeel.getControlDarkShadow());    g.drawLine(x, y, x + w - 7, y);    g.drawLine(x + w - 7, y, x + w - 1, y + 6);    g.drawLine(x + w - 1, y + 6, x + w - 1, y + h - 1);    g.drawLine(x + w - 1, y + h, x, y + h);  }