public Dimension preferredLayoutSize(Container parent){
  return calculateLayoutSize(parent,'P');
}

public Dimension preferredLayoutSize ( Container parent ) { return calculateLayoutSize ( parent , 'P' ) ; }
calculates the preferred size dimensions for the specified container , given the components it contains .
