void (final RadContainer container, final List<RadComponent> contents, final List<Boolean> canRowsGrow, final List<Boolean> canColumnsGrow) { int rowCount = canRowsGrow.size(); int columnCount = canColumnsGrow.size(); int rowCountWithGaps = (rowCount == 0) ? 0 : rowCount * 2 - 1; int columnCountWithGaps = (columnCount == 0) ? 0 : columnCount * 2 - 1; RowSpec[] rowSpecs = new RowSpec [rowCountWithGaps]; ColumnSpec[] colSpecs = new ColumnSpec [columnCountWithGaps]; for(int i=0; i<rowCount; i++) { rowSpecs [i*2] = canRowsGrow.get(i).booleanValue() ? new RowSpec(ENCODED_FORMSPEC_GROW) : new RowSpec(DEFAULT_NOGROW_SIZE); if (i*2+1 < rowSpecs.length) { rowSpecs [i*2+1] = FormFactory.RELATED_GAP_ROWSPEC; } } for(int i=0; i<columnCount; i++) { colSpecs [i*2] = canColumnsGrow.get(i).booleanValue() ? new ColumnSpec(ENCODED_FORMSPEC_GROW) : new ColumnSpec(DEFAULT_NOGROW_SIZE); if (i*2+1 < colSpecs.length) { colSpecs [i*2+1] = FormFactory.RELATED_GAP_COLSPEC; } } container.setLayoutManager(this, new FormLayout(colSpecs, rowSpecs)); }