JComponent () { if (rootComponent == null) { Configurable firstConfigurable = children[0]; if (children.length == 1) { JComponent component = firstConfigurable.createComponent(); String rootComponentDisplayName = firstConfigurable.getDisplayName(); if (!StringUtil.isEmpty(rootComponentDisplayName) && !isTargetedToProduct(firstConfigurable)) { component.setBorder(IdeBorderFactory.createTitledBorder(rootComponentDisplayName, false, FIRST_COMPONENT_INSETS)); } rootComponent = createPanel(true); rootComponent.add(component); } else { boolean isFirstNamed = true; JPanel panel = createPanel(true); for (Configurable configurable : children) { JComponent component = configurable.createComponent(); assert component != null; String displayName = configurable.getDisplayName(); if (StringUtil.isEmpty(displayName)) { component.setBorder(BOTTOM_INSETS); } else { boolean addBorder = true; if (isUseTargetedProductPolicyIfSeveralChildren() && isFirstNamed) { isFirstNamed = false; if (isTargetedToProduct(configurable)) { addBorder = false; } } if (addBorder) { component.setBorder(IdeBorderFactory.createTitledBorder(displayName, false, firstConfigurable == configurable ? FIRST_COMPONENT_INSETS : N_COMPONENT_INSETS)); } } panel.add(component); } rootComponent = panel; } } return rootComponent; }