void () { if (!mySimpleDesignMode) { return; } int length = myPanels.length; boolean border = true; for (int i = 0; i < length; i++) { OneElementComponent panel = myPanels[i]; int count = panel.getComponentCount(); if (length > 1) { if (count > 1) { panel.setLineBorder(i > 0 && border, i != length - 1); border = false; } else { border = true; } } if (i == length - 1) { if (count == 1) { ((JComponent)panel.getComponent(0)).setBorder(null); continue; } } else if (count == 1) { ((JComponent)panel.getComponent(0)).setBorder(JBUI.Borders.emptyBottom(3)); continue; } if (count > 1) { for (int j = 0; j < count - 1; j++) { ((JComponent)panel.getComponent(j)).setBorder(JBUI.Borders.emptyBottom(3)); } ((JComponent)panel.getComponent(count - 1)).setBorder(null); } } List<JLabel> labels = new ArrayList<>(); for (OneElementComponent panel : myPanels) { int count = panel.getComponentCount(); for (int i = 0; i < count; i++) { OneLineComponent line = (OneLineComponent)panel.getComponent(i); if (line.myLabel.getIcon() != EmptyIcon.ICON_16) { for (int j = i + 1; j < count; j++) { OneLineComponent nextLine = (OneLineComponent)panel.getComponent(j); if (nextLine.myLabel.getIcon() != EmptyIcon.ICON_16) { nextLine.myLabel.setIcon(EmptyIcon.ICON_16); } } return; } labels.add(line.myLabel); } } for (JLabel label : labels) { label.setIcon(null); label.setIconTextGap(0); } }