public FormLayout(ColumnSpec[] colSpecs,RowSpec[] rowSpecs){
  checkNotNull(colSpecs,"The column specifications must not be null.");
  checkNotNull(rowSpecs,"The row specifications must not be null.");
  this.colSpecs=new ArrayList<ColumnSpec>(Arrays.asList(colSpecs));
  this.rowSpecs=new ArrayList<RowSpec>(Arrays.asList(rowSpecs));
  colGroupIndices=new int[][]{};
  rowGroupIndices=new int[][]{};
  int initialCapacity=colSpecs.length * rowSpecs.length / 4;
  constraintMap=new HashMap<Component,CellConstraints>(initialCapacity);
  componentSizeCache=new ComponentSizeCache(initialCapacity);
  minimumWidthMeasure=new MinimumWidthMeasure(componentSizeCache);
  minimumHeightMeasure=new MinimumHeightMeasure(componentSizeCache);
  preferredWidthMeasure=new PreferredWidthMeasure(componentSizeCache);
  preferredHeightMeasure=new PreferredHeightMeasure(componentSizeCache);
}

public FormLayout ( ColumnSpec [ ] colSpecs , RowSpec [ ] rowSpecs ) { checkNotNull ( colSpecs , "The column specifications must not be null." ) ; checkNotNull ( rowSpecs , "The row specifications must not be null." ) ; this . colSpecs = new ArrayList < ColumnSpec > ( Arrays . asList ( colSpecs ) ) ; this . rowSpecs = new ArrayList < RowSpec > ( Arrays . asList ( rowSpecs ) ) ; colGroupIndices = new int [ ] [ ] { } ; rowGroupIndices = new int [ ] [ ] { } ; int initialCapacity = colSpecs . length * rowSpecs . length / 4 ; constraintMap = new HashMap < Component , CellConstraints > ( initialCapacity ) ; componentSizeCache = new ComponentSizeCache ( initialCapacity ) ; minimumWidthMeasure = new MinimumWidthMeasure ( componentSizeCache ) ; minimumHeightMeasure = new MinimumHeightMeasure ( componentSizeCache ) ; preferredWidthMeasure = new PreferredWidthMeasure ( componentSizeCache ) ; preferredHeightMeasure = new PreferredHeightMeasure ( componentSizeCache ) ; }
constructs a formlayout using the given column and row specifications .
