JComponent () { JPanel result = new JPanel(); result.setLayout(new GridBagLayout()); JComponent mainEditorComponent = myMainEditor.getComponent(); GridBagConstraints c = new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, JBInsets.emptyInsets(), 0, 0); result.add(mainEditorComponent, c); for (int i = 0; i < myExtensionEditors.size(); i++) { c = (GridBagConstraints)c.clone(); c.gridy = i + 1; result.add(myExtensionEditors.get(i).getComponent(), c); } return result; }