JButton (@NotNull Action action) { JButton helpButton = new JButton(action); helpButton.putClientProperty("JButton.buttonType", "help"); helpButton.setText(""); helpButton.addPropertyChangeListener("ancestor", evt -> { if (evt.getNewValue() == null) { HelpTooltip.dispose((JComponent)evt.getSource()); } }); helpButton.getAccessibleContext().setAccessibleName(UIBundle.message("dialog.options.help.button.accessible.name")); helpButton.getAccessibleContext().setAccessibleDescription(ActionsBundle.message("action.HelpTopics.description")); return helpButton; }