//注册账号 创建button按钮鼠标事件
button_register.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
DiscDate.stackLayout.topControl = DiscDate.registerComposite; //DiscDate是自己创建的类
shell.layout();
}
});
//创建注册面板
DiscDate.registerComposite = new RegisterComposite(shell, SWT.NONE); //注册面板
//用Composite跳转 只需要把Shell 改变成 composite.getshell()
//composite得到父类的shell 不然运行会报异常
DiscDate.stackLayout.topControl = DiscDate.detailComposite;
composite.getShell().layout();
}
});
DiscDate.detailComposite = new DetailComposite(composite.getShell(), SWT.NONE);