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);
 }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值