@Override
  protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) {
    if (tabStyle == TabStyle.fill) {
      if (tabPane.isEnabled()) {
        g.setColor(isSelected ? ENABLED_SELECTED_COLOR : tabIndex == hoverTab ? getHoverColor() : tabPane.getBackground());
      }
      else {
        g.setColor(isSelected ? DISABLED_SELECTED_COLOR : tabPane.getBackground());
      }
    }
    else {
      // underline
      Color c = tabPane.getBackground();
      if (tabPane.isEnabled()) {
        if (tabPane.hasFocus() && isSelected) {
          c = FOCUS_COLOR;
        }
        else if (tabIndex == hoverTab) {
          c = getHoverColor();
        }
      }

      g.setColor(c);
    }

    if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) {
      if (tabPlacement == LEFT || tabPlacement == RIGHT) {
        w -= getOffset();
      }
      else {
        h -= getOffset();
      }
    }

    g.fillRect(x, y, w, h);
  }
@Override
  protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)