package demotest;
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
/**
*
* @author mositure
* 容器Composite学习
*/
public class CompositeTest {
/**
* @param args
*/
public static void main(String[] args) {
//创建一个display对象。
Display display=new Display();
//shell是程序的主窗体
final Shell shell=new Shell(display);
shell.setText("Composite");
// Composite的常用方法:
// getLayout():得到布局管理器。
// getLayoutData():得到布局数据。
// getParent():得到容纳该容器的父容器。
// getShell():得到容纳该容器的Shell。
// layout():将容器上的组件重新布局,相当于刷新。
//容器创建
Composite composite=new Composite(shell,SWT.BORDER);
composite.setBounds(10,