JComponent (Configurable configurable) { JComponent content = new JPanel(new BorderLayout()); content.setBorder(JBUI.Borders.empty(11, 16, 16, 16)); Configurable.Composite compositeGroup = ObjectUtils.tryCast(configurable, Configurable.Composite.class); if (compositeGroup == null) { String description = IdeBundle.message("label.select.configuration.element"); content.add(BorderLayout.CENTER, new JLabel(description, SwingConstants.CENTER)); content.setPreferredSize(JBUI.size(800, 600)); } else { ConfigurableGroup configurableGroup = ConfigurableWrapper.cast(ConfigurableGroup.class, configurable); String description = configurableGroup != null ? configurableGroup.getDescription() : null; content.add(BorderLayout.CENTER, createConfigurablesListPanel(description, Arrays.asList(compositeGroup.getConfigurables()), this)); } JScrollPane pane = createScrollPane(content, true); pane.setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_NEVER); return pane; }