JPanel () { JPanel optionsPanel = new JPanel(new MigLayout("ins 0 20 0 0, flowx, gapx 16")); //NON-NLS List<VcsPushOptionsPanel> panels = new ArrayList<>(myAdditionalPanels.values()); panels.addAll(myCustomPanels.values()); for (VcsPushOptionsPanel panel : panels) { if (panel.getPosition() == VcsPushOptionsPanel.OptionsPanelPosition.SOUTH) { optionsPanel.add(panel); } } return optionsPanel; }