Source Code : Simplest GridLayout

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

Simplest GridLayout

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;

public class Ch6GridLayoutComposite extends Composite {

  public Ch6GridLayoutComposite(Composite parent) {
    super(parent, SWT.NONE);

    GridLayout layout = new GridLayout(4, false);
    setLayout(layout);
    for (int i = 0; i < 16; ++i) {
      Button button = new Button(this, SWT.NONE);
      button.setText("Cell " + i);
    }
  }
}

           
       

Thank with us