void (@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); } }