void (final @NlsContexts.DialogTitle String title) { setTitle(title); myCurrentStep = 0; myPreviousButton = new JButton(IdeBundle.message("button.wizard.previous")); myNextButton = new JButton(IdeBundle.message("button.wizard.next")); myCancelButton = new JButton(CommonBundle.getCancelButtonText()); myHelpButton = isNewWizard() ? createHelpButton(JBInsets.emptyInsets()) : new JButton(CommonBundle.getHelpButtonText()); myContentPanel = new JPanel(new JBCardLayout()); myIcon = new TallImageComponent(null); JRootPane rootPane = getRootPane(); if (rootPane != null) { // it will be null in headless mode, i.e. tests rootPane.registerKeyboardAction( new ActionListener() { @Override public void actionPerformed(final ActionEvent e) { helpAction(); } }, KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), JComponent.WHEN_IN_FOCUSED_WINDOW ); rootPane.registerKeyboardAction( new ActionListener() { @Override public void actionPerformed(final ActionEvent e) { helpAction(); } }, KeyStroke.getKeyStroke(KeyEvent.VK_HELP, 0), JComponent.WHEN_IN_FOCUSED_WINDOW ); } }