
package demotest;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
/**
* @author mositure
*/
public class Test_one {
/**
* @param args
*/
public static void main(String[] args) {
//创建Display实列 相当于 Display display = new Display();
Display display = Display.getDefault();
//创建主窗体
final Shell parent = new Shell(display,SWT.SHELL_TRIM);
parent.setText("多窗口案列");
parent.setSize(300, 400);
//设置父窗口图标
// parent.setImage(new Image(display,"图片路径"));
//新增按钮
Button button = new Button(parent, SWT.NONE);
button.setText("增加子窗口");
button.setBounds(10, 10, 80, 40);
button.addSelectionListe