TShopping

 找回密碼
 註冊
搜索
查看: 4495|回復: 0

[教學] eclipse plugin - WindowBuilder (swing SWT) 二法

[複製鏈接]
發表於 2014-4-29 14:52:21 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
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
  • Select "Help > Install New Software..." in the main menu to open the "Install" dialog

  • 然後選All Available Sites
  • Drag the URL for this update site and drop it into the "Work with" field of the "Install" dialog
    (Click and drag the icon in front of the URL in your browser's address bar to drag the URL)
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".

  • Check all features to be installed in the "Install" dialog
  • Click the "Next" button


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。

 

臉書網友討論
*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-3-29 19:13 , Processed in 0.067666 second(s), 22 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表