Skip to content
Jin Liu edited this page Apr 3, 2015 · 2 revisions

Group除了可以设置标题外,其它的属性和Composite一样。

	Display display = new Display();
	Shell shell = new Shell(display);
	shell.setText("Group Tutorial");
	shell.setLayout(new RowLayout());

	Group group = new Group(shell, SWT.NONE);
	group.setText("Foxes vs. Dogs");

	shell.setSize(300, 200);
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch()) {
			display.sleep();
		}
	}
	display.dispose();

如图:


参考资料:


上一篇:Canvas Tutorial 下一篇:TabFolder Tutorial

Eclipse Plug-in Development Tutorial

Clone this wiki locally