Source Code : SWT GridLayout: GridSpan
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
SWT GridLayout: GridSpan
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
public class Ch6GridSpanComposite extends Composite {
public Ch6GridSpanComposite(Composite parent) {
super(parent, SWT.NONE);
GridLayout layout = new GridLayout(3, false);
setLayout(layout);
Button b = new Button(this, SWT.NONE);
b.setText("Button 1");
b = new Button(this, SWT.NONE);
b.setText("Button 2");
b.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
b = new Button(this, SWT.NONE);
b.setText("Button 3");
Text t = new Text(this, SWT.MULTI);
GridData data = new GridData(GridData.FILL_BOTH);
data.horizontalSpan = 2;
data.verticalSpan = 2;
t.setLayoutData(data);
b = new Button(this, SWT.NONE);
b.setText("Button 4");
b.setLayoutData(new GridData(GridData.FILL_VERTICAL));
b = new Button(this, SWT.NONE);
b.setText("Button 5");
b.setLayoutData(new GridData(GridData.FILL_VERTICAL));
}
}
Thank with us