@Override
  protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected) {
    int delta = SELECTION_HEIGHT.get();
    if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT) {
      delta -= getOffset();
    }

    return switch (tabPlacement) {
      case RIGHT, LEFT -> 0;
      case BOTTOM -> delta / 2;
      //case TOP,
      default -> -delta / 2;
    };
  }
@Override
  protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)