Using FillLayout : FillLayout « SWT « Java Tutorial

  1. FillLayout lays out controls into a single row or column (without wrap).
  2. FillLayout forces all the children to be the same size.
  3. FillLayout places the children into the whole client area of a composite.

You can specify the margins and spacing properties. FillLayout has no layout data. The primary usage of FillLayouts is laying out controls in task bars and toolbars.

It places all controls in either a single column or a single row, and makes them all the same size.

FillLayout Constructors:

public FillLayout()Constructs a FillLayout and sets type to SWT.HORIZONTAL.
public FillLayout(int type)Constructs a FillLayout and sets type to the passed type.

17.95.1.Using FillLayout
17.95.2.Configure the layout orientation: HORIZONTAL and VERTICALConfigure the layout orientation: HORIZONTAL and VERTICAL
17.95.3.Define the margins and spacing propertiesDefine the margins and spacing properties
17.95.4.Set spacing propertiesSet spacing properties