JPanel () { JPanel optionsPanel = new OptionsPanel(); optionsPanel.setBorder(JBUI.Borders.emptyTop(2)); List<VcsPushOptionsPanel> panels = new ArrayList<>(myAdditionalPanels.values()); panels.addAll(myCustomPanels.values()); for (VcsPushOptionsPanel panel : panels) { if (panel.getPosition() == VcsPushOptionsPanel.OptionsPanelPosition.DEFAULT) { optionsPanel.add(panel); } } return optionsPanel; }