import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ProgressBar;
import org.eclipse.swt.custom.ScrolledComposite;
public class foobar {
private Shell sShell = null;
private Composite composite = null;
private Button button = null;
private Button button1 = null;
private Button button2 = null;
private void createComposite() {
GridData gridData = new GridData();
gridData.verticalSpan = 4;
gridData.horizontalSpan = 2;
composite = new Composite(sShell, SWT.NONE);
FillLayout compositeLayout = new FillLayout();
compositeLayout.type = SWT.VERTICAL;
composite.setLayout(compositeLayout);
composite.setLayoutData(gridData);
button1 = new Button(composite, SWT.NONE);
button1.setText("Foobar");
button = new Button(composite, SWT.NONE);
button.setText("Barfoo");
button2 = new Button(composite, SWT.NONE);
button2.setText("Foo");
}
public static void main(String[] args) {
Display display = Display.getDefault();
foobar thisClass = new foobar();
thisClass.createSShell();
thisClass.sShell.open();
while (!thisClass.sShell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
private void createSShell() {
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
sShell = new Shell();
sShell.setText("Shell");
createComposite();
sShell.setLayout(gridLayout);
sShell.setSize(new Point(498, 319));
}
}