JComponent (List<JComponent> additionalPanels) { final JPanel panel = new JPanel(new GridBagLayout()); final GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.NORTHWEST; c.gridx = 0; c.gridy = GridBagConstraints.RELATIVE; c.weightx = 1; c.fill = GridBagConstraints.HORIZONTAL; panel.add(myPanel.myWholePanel, c); for (JComponent p : additionalPanels) { panel.add(p, c); } c.fill = GridBagConstraints.BOTH; c.weightx = 1; c.weighty = 1; panel.add(Box.createVerticalBox(), c); return panel; }