void () { JPanel panel = getContentPanel(); panel.removeAll(); int count = 1; for (ControlWrapper panelControl : panelControls) { if (!panelControl.isAvailable()) continue; panelControl.initialize(); panel.add(panelControl.getComponent(), new GridBagConstraints(0, count, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, JBUI.insets(0, 5), 0, 0)); ++count; } revalidate(); }