TShopping

標題: eclipse plugin - WindowBuilder (swing SWT) 二法 [打印本頁]

作者: woff    時間: 2014-4-29 14:52
標題: eclipse plugin - WindowBuilder (swing SWT) 二法
a.安裝
接下來介紹如何把WindowBuilder安裝到eclipse中,主要參考來源WindowBuilder User Guide

據說下載連結壞掉了,因此補上另一個網址
Installing WindowBuilder Pro
1.首先進入網頁,點選Download,會看到以下的資訊



選取相對應eclipse版本的網址,這邊以3.7版本為例子。

2.打開你的eclipse,按下 Help > Install New Software > Add
windowsbuilder - http://dl.google.com/eclipse/inst/d2wbpro/latest/3.7
Name:可以自己命名
Location:輸入剛剛複製的網址
3.接著會出現四個選項,全勾就好,按下Next之後,會有版權聲明,按下I accept......就好

會出現Security Waring,選擇ok,接著重新啟動eclipse

使用啟動eclipse後, 按下File > NEW > Other,會跳出wizard視窗

選WindowBuilder >Swing Designer >JFrame  >自行命名名稱

選擇左下角的Design,就會看到component可以直接用選取的方式產生了,每個component也可以像.NET一樣,設定屬性,選擇Source會看到WindowBuilder幫你產生的code,有需要可以再修改






b.第一種,首先到官方下載eclipse
http://download.eclipse.org/windowbuilder/WB/release/R201309271200/4.2/
選 "Help > Install New Software...

http://www.eclipse.org/windowbuilder/
If you have previously installed WindowBuilder Pro Eclipse without using the Update Manager (e.g. using the WindowBuilder Pro Eclipse installer)
then you must first uninstall WindowBuilder Pro Eclipse before installing from this update site.
To install WindowBuilder Pro Eclipse from this update site

If you cannot drag the URL from your browser, then click the "Add..." button in the "Install" dialog
then copy and paste the URL into the "Add Site" dialog and click "OK".
If you add the URL but WindowBuilder Pro Eclipse does not appear in the list of sites,
then pull down the "Work with" field and select "All Available Sites".



b.第二種
最近在學習如何撰寫java GUI介面,不過找了幾本書,發現大部分都是教導-如何直接用程式碼寫刻出GUI。
大概像這樣,要寫不少code,才能出現一個視窗

  話說之前大學時接觸過Microsoft的 .NET,對於java的這種設計方是真的不太能接受。
因此就比較了幾款eclipse的GUI plugin,找到了大家較為推崇的WindowBuilder。

  要來介紹WindowBuilder,當然要先談WindowBuilder的來歷,WindowBuilder本來是屬於Instantiations公司,一套知名的java圖形化設計工具,後來被Google以五百萬美金買下後,以open source的方式捐贈給eclipse的基金會,才造就我們有這麼方便的工具可以使用,不過也似乎因為這樣,造成原本就免費的圖形化設計工具-Visual Editor(VE)和Jigloo停止繼續支援新版的eclipse。




歡迎光臨 TShopping (http://www.tshopping.com.tw/) Powered by Discuz! X3.2