Maximize Control : SashForm « SWT « Java Tutorial

Maximize Control
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class SashFromMaximizeControl {
  public static void main(String[] args) {
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setText("SashForm Test");
    // Fill the parent window with the buttons and sash
    shell.setLayout(new FillLayout());

    // Create the SashForm and the buttons
    SashForm sashForm = new SashForm(shell, SWT.VERTICAL);
    new Button(sashForm, SWT.PUSH).setText("Left");
    Button control = new Button(sashForm, SWT.PUSH);
    if (control == sashForm.getMaximizedControl()) {
    } else {
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) {


17.85.1.SashForms can be either horizontal or vertical: SWT.HORIZONTAL or SWT.VERTICAL,SashForms can be either horizontal or vertical: SWT.HORIZONTAL or SWT.VERTICAL,
17.85.2.Change SashForm WeightChange SashForm Weight
17.85.3.Change SashForm OrientationChange SashForm Orientation
17.85.4.Maximize ControlMaximize Control
17.85.5.Control the width in pixels of all sashesControl the width in pixels of all sashes
17.85.6.Vertical SashFormVertical SashForm
17.85.7.SashForm: create a sash form with three childrenSashForm: create a sash form with three children