int (int tabPlacement, int tabIndex, boolean isSelected) { int delta = SELECTION_HEIGHT.get(); if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT) { delta -= getOffset(); } return switch (tabPlacement) { case TOP, BOTTOM -> 0; case LEFT -> -delta / 2; //case RIGHT, default -> delta / 2; }; }