void (final RadContainer container, final List<RadComponent> components) { int maxSizePolicy = 0; for(RadComponent c: components) { maxSizePolicy = Math.max(maxSizePolicy, c.getConstraints().getHSizePolicy()); } ColumnSpec[] colSpecs = new ColumnSpec [components.size() * 2 - 1]; for(int i=0; i<components.size(); i++) { colSpecs [i*2] = components.get(i).getConstraints().getHSizePolicy() == maxSizePolicy ? new ColumnSpec(ENCODED_FORMSPEC_GROW) : FormFactory.DEFAULT_COLSPEC; if (i*2+1 < colSpecs.length) { colSpecs [i*2+1] = FormFactory.RELATED_GAP_COLSPEC; } } container.setLayoutManager(this, new FormLayout(colSpecs, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC } )); }