new Sash(Composite parent, int style) : Sash « org.eclipse.swt.widgets « Java by API






new Sash(Composite parent, int style)

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Sash;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

public class MainClass {

  public static void main(String[] a) {
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setText("Sash One");
    shell.setLayout(new FillLayout());
    new Text(shell, SWT.BORDER);
    new Sash(shell, SWT.VERTICAL);
    new Text(shell, SWT.BORDER);

    shell.pack();
    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) {
        display.sleep();
      }
    }
    display.dispose();
  }
}


           
       








Related examples in the same category

1.new Sash(shell, SWT.VERTICAL)
2.Sash: addSelectionListener(SelectionListener lis)