public static void switchFrameIfPossible(@NotNull JFrame frame, boolean next) {
    if (JdkEx.isTabbingModeAvailable()) {
      Foundation.executeOnMainThread(true, false, () -> {
        Foundation.invoke(MacUtil.getWindowFromJavaWindow(frame), next ? "selectNextTab:" : "selectPreviousTab:", ID.NIL);
      });
    }
  }
public static void switchFrameIfPossible(@NotNull JFrame frame, boolean next)