SWT实践过程中遇到的问题

1.import org.eclipse.swt.widgets.Text;  诸如右所示的找不到这个包。

解决办法:project->properties->build path->add exteral jar->找到Eclipse安装目录的plungin文件夹,添加org.eclipse.swt.win32.win32.x86xxxxx.jar就行了。其余类似的问题都可这样解决。

2.在shell.open(); 后面加上 shell.setLayout(new FillLayout()); shell.layout(); 可以起到让view填充整个画面的效果。

猜你喜欢

转载自wjy320.iteye.com/blog/1999911