作者:幻 该文非常优秀,个人认为做入门教材再好不过。 1。 SWT/JFace开发入门指南(一) http://blog.csdn.net/jayliu/services/trackbacks/367757.aspx 注:添加的库文件,swt.jar的内容有所出入,我的路径是//eclipse/plugins/org.eclipse.swt.win32_3.0.1/ws/win32/swt.jar 2。 SWT/JFace开发入门指南(二) http://blog.csdn.net/jayliu/services/trackbacks/368099.aspx 注:文中英文引用的汉语翻译 “Applications which are built with SWT will almost always require only a single display. In particular, some platforms which SWT supports will not allow more than one active display. In other words, some platforms do not support creating a new display if one already exists that has not been sent the dispose() message.”
swt应用通常只需一个单一的display。而支持swt的一些平台根本就不允许多个活动的display。换句话说,在现存的display没有dispose之前,根本就不允许创建新的display。 shell.setText("Labels");//这个写在Form上喽 还好有第二个更简单的使用adapter改良方法,所以没成功也就没有多加注意。 时间不等人。研究工作少做一点,等深入了解后会慢慢明白的。 此外_shell的get、set方法和变量名不对应,我的习惯是写了变量就直接Alt+ sr,所以生成的方法名和变量名都是对应的。不知道这个算不算一个小技巧: ) |
|