How to install Free Window Builder for Java in Eclipse

How to install Window Builder for Java in Eclipse
If you’re an amateur Java developer, like I am, you probably know that creating the simplest of GUI driven applications can be challenging. While reading for the final year of my degree, a year or so ago, I came across Window Builder which, in short, takes the pain out of building a graphical interface for Java applications. If you’re an Eclipse IDE user, read on.

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

If you’re an amateur Java developer, like I am, you probably know that creating the simplest of GUI driven applications can be challenging. While reading for the final year of my degree, a year or so ago, I came across Window Builder which, in short, takes the pain out of building a graphical interface for Java applications. If you’re an Eclipse IDE user, read on.

Adding WindowBuilder to Eclipse

I currently have Eclipse Neon.3 Release 4.6.3 installed on my home PC. The procedure outlined should however work on older and later releases of Eclipse.

How to install Free Window Builder for Java in Eclipse 1

From the Help menu, select Install New Software …

How to install Free Window Builder for Java in Eclipse 2

Type http://download.eclipse.org/windowbuilder/WB/integration/4.6/ in the Work With field, check the box next to WindowBuilder and hit the Next button.

How to install Free Window Builder for Java in Eclipse 3

Review the items that will be installed and hit Next. I opted to install all the items listed but you can always pick and choose what to install.

How to install Free Window Builder for Java in Eclipse 4

Accept the license agreement and hit Finish.

How to install Free Window Builder for Java in Eclipse 5

After the installation completes, you will be asked to restart Eclipse.

How to install Free Window Builder for Java in Eclipse 6
How to install Free Window Builder for Java in Eclipse 7

To test WindowsBuilder, create or open an existing Project. From the default package, select Other from the New menu or simply press CTRL-n. Scrolling down to the end of the Wizards list, you should see an entry named WindowBuilder.

How to install Free Window Builder for Java in Eclipse 8

As an example, I want to create an application that uses Swing so I simply expand Swing Designer and select Application Window from the list of available options. Click Next.

How to install Free Window Builder for Java in Eclipse 9

Type in a name for the new Swing application and click Finish.

How to install Free Window Builder for Java in Eclipse 10

The wizard creates all the required base code for you. If you run it, an empty JFrame window is displayed.

How to install Free Window Builder for Java in Eclipse 11

To add elements or components to the JFrame, switch to the Design page by clicking the tab at the bottom of the code page. Once you’re there, you can change the layout, add containers, event handlers and what not. Although all the required code is automatically added for you, you still need to add logic to it to make it all work. So for instance, if you want to add a record to a database by clicking on an Add button, you will add the required logic to an event handler. To  do this simply, right-click on a component, a JButton in this case, and select an event handler.

How to install Free Window Builder for Java in Eclipse 12
How to install Free Window Builder for Java in Eclipse 13

Here’s a more thorough example of what WindowBuilder can do for you. This is a screenshot of an application I wrote as part of my studies.

How to install Free Window Builder for Java in Eclipse 14

So, now you know what tool to use when developing an UI driven Java app! To learn more about WindowBuilder, visit the official documentation site here.

Thanks!

Subscribe To Our Newsletter

Get updates and learn from the best

More To Explore

Do You Want To Contact With me?

drop us a line and keep in touch