作者:幻 該文非常優(yōu)秀,個(gè)人認(rèn)為做入門(mén)教材再好不過(guò)。 1。 SWT/JFace開(kāi)發(fā)入門(mén)指南(一) http://blog.csdn.net/jayliu/services/trackbacks/367757.aspx 注:添加的庫(kù)文件,swt.jar的內(nèi)容有所出入,我的路徑是//eclipse/plugins/org.eclipse.swt.win32_3.0.1/ws/win32/swt.jar 2。 SWT/JFace開(kāi)發(fā)入門(mén)指南(二) http://blog.csdn.net/jayliu/services/trackbacks/368099.aspx 注:文中英文引用的漢語(yǔ)翻譯 “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應(yīng)用通常只需一個(gè)單一的display。而支持swt的一些平臺(tái)根本就不允許多個(gè)活動(dòng)的display。換句話說(shuō),在現(xiàn)存的display沒(méi)有dispose之前,根本就不允許創(chuàng)建新的display。 shell.setText("Labels");//這個(gè)寫(xiě)在Form上嘍 還好有第二個(gè)更簡(jiǎn)單的使用adapter改良方法,所以沒(méi)成功也就沒(méi)有多加注意。 時(shí)間不等人。研究工作少做一點(diǎn),等深入了解后會(huì)慢慢明白的。 此外_shell的get、set方法和變量名不對(duì)應(yīng),我的習(xí)慣是寫(xiě)了變量就直接Alt+ sr,所以生成的方法名和變量名都是對(duì)應(yīng)的。不知道這個(gè)算不算一個(gè)小技巧: ) |
|