SWT:自定义分分割窗口

public static void showCBanner(Shell shell)
 {
  //创建CBanner对象
  CBanner banner = new CBanner(shell, SWT.BORDER);
  banner.setLayout(new FillLayout());
  
  //创建3个面板,分别放置到左侧,右侧和下部
  Composite left = new Composite(banner, SWT.NONE);
  left.setLayout(new FillLayout());
  new Text(left, SWT.MULTI).setText("左侧");
  
  Composite right = new Composite(banner, SWT.NONE);
  right.setLayout(new FillLayout());
  new Text(right, SWT.MULTI).setText("右侧");
  
  Composite bottom = new Composite(banner, SWT.NONE);
  bottom.setLayout(new FillLayout());
  new Text(bottom, SWT.MULTI).setText("下部");
  
  //设置左侧的控件
  banner.setLeft(left);
  //设置右侧的控件
  banner.setRight(right);
  //设置下部的控件
  banner.setBottom(bottom);
  
  //改变分割线的外观
  banner.setSimple(false);
 }

你可能感兴趣的:(SWT)