void (JComponent editor, int vSizePolicy) { if (myEditorComponent != null) { myForm.getEditorPanel().remove(myEditorComponent); } final GridConstraints gridConstraints = new GridConstraints(); gridConstraints.setFill(vSizePolicy == GridConstraints.SIZEPOLICY_WANT_GROW ? GridConstraints.FILL_BOTH : GridConstraints.FILL_HORIZONTAL); gridConstraints.setVSizePolicy(vSizePolicy); myForm.getEditorPanel().add(myEditorComponent = editor, gridConstraints); }