On Java Development

All things related to Java development, from the perspective of a caveman.

Installing WindowBuilder (Swing/SWT development plugin)

without comments


This post shows how to install the Swing/SWT GUI development tool to create applications to be deployed directly onto PCs.

In the beginning…

In the old days, circa 2003 or so, setting up Eclipse so that it was ready for developing Swing applications was a bit of a pain. The developer wishing to use Swing first had to download the required Eclipse Visual Editor Project as well as the related Eclipse Modeling Project (EMP) and Graphical Editing Framework (GEF) plugins. Only then was Eclipse ready to develop applications known as ‘fat clients’.

Fat clients are applications such as Word or Powerpoint. They have to be installed onto each PC to use them. There are no servers involved for applications such as these.

Installing fat client applications across a company is a huge undertaking where each PC has the potential to create problems of their own. This is why a web application would be a better tool for the job. However, for developers wanting to build a utility or maybe an application for a single user, Swing might be the right tool.

An example of a Swing based utility used to generate DAO related classes.

An example of a Swing based utility used to generate DAO related classes.

Still, arguments could be made against it, such as diffusion of technical know-how across an organization, for example. The developers must learn and master programming using Swing’s event model. For these reasons and especially if they are large, Swing applications are a bit more cumbersome than a JSF application without the benefits of a single point of deployment.

So, why this post? The overarching point to this post is to simply highlight another Java development technology and these days, it is much easier to install than before.


What is WindowBuilder?

As described by the web-site…

WindowBuilder is composed of SWT Designer and Swing Designer and makes it very easy to create Java GUI applications without spending a lot of time writing code. Use the WYSIWYG visual designer and layout tools to create simple forms to complex windows; the Java code will be generated for you. Easily add controls using drag-and-drop, add event handlers to your controls, change various properties of controls using a property editor, internationalize your app and much more.

WindowBuilder is built as a plug-in to Eclipse and the various Eclipse-based IDEs (RAD, RSA, MyEclipse, JBuilder, etc.). The plug-in builds an abstract syntax tree (AST) to navigate the source code and uses GEF to display and manage the visual presentation.

Generated code doesn’t require any additional custom libraries to compile and run: all of the generated code can be used without having WindowBuilder Pro installed. WindowBuilder Pro can read and write almost any format and reverse-engineer most hand-written Java GUI code. It also supports free-form code editing (make changes anywhere…not just in special areas) and most user re-factorings (you can move, rename and subdivide methods without a problem).



Installing the Plug-in

First, go to the WindowBuilder homepage, select the yellow button on the upper-right of the screen and follow the instructions there. Documentation for WindowBuilder Pro is posted here.


Written by admin

January 19th, 2015 at 2:20 pm

Leave a Reply

You must be logged in to post a comment.