private void fitSizeOfScrolledContent(){
  Point p=scrollComposite.getSize();
  main.setSize(main.computeSize(p.x,SWT.DEFAULT));
}

private void fitSizeOfScrolledContent ( ) { Point p = scrollComposite . getSize ( ) ; main . setSize ( main . computeSize ( p . x , SWT . DEFAULT ) ) ; }
fits the width of the main composite to the same width scrolled composite was given .
