private static void updateBottomPanel(@NotNull JPanel currentPanel,
                                        @NotNull JButton actionButton,
                                        @NotNull JPanel bottomPanel,
                                        @Nullable Runnable backAction) {
    bottomPanel.removeAll();

    if (SystemInfo.isMac) {
      addCancelButton(bottomPanel, backAction);
      addActionButton(bottomPanel, actionButton, currentPanel);
    }
    else {
      addActionButton(bottomPanel, actionButton, currentPanel);
      addCancelButton(bottomPanel, backAction);
    }
  }
private static void updateBottomPanel(@NotNull JPanel currentPanel,
                                        @NotNull JButton actionButton,
                                        @NotNull JPanel bottomPanel,
                                        @Nullable Runnable backAction)