final ScrolledComposite sc = new ScrolledComposite(parent, SWT.V_SCROLL);
final Composite composite = new Composite(sc, SWT.NONE);
composite.setLayout(new GridLayout());
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
sc.setContent(composite);
sc.addControlListener(new ControlAdapter() {
public void controlResized(ControlEvent e) {
Rectangle r = sc.getClientArea();
sc.setMinSize(composite.computeSize(r.width, SWT.DEFAULT));
}
});