void (@NotNull JPanel p, @NotNull ButtonGroup buttonGroup) { IdeBackgroundUtil.Anchor[] values = IdeBackgroundUtil.Anchor.values(); String[] names = new String[values.length]; for (int i = 0; i < names.length; i++) { names[i] = StringUtil.toLowerCase(values[i].name().replace('_', '-')); } Color color = getSelectionBackground(); p.setLayout(new GridLayout(3, 3, 1, 1)); for (int i = 0; i < names.length; i ++) { JRadioButton button = new JRadioButton(names[i], values[i] == IdeBackgroundUtil.Anchor.CENTER); button.setToolTipText(StringUtil.capitalize(button.getText().replace('-', ' '))); buttonGroup.add(button); addClickablePanel(p, button, color); } }