Monday, 10 August 2009

Install Eclipse UI Form Editor

Developing Swing (or any other GUI) forms can be cumbersome and time consuming especially if you're a newbie or have complex screens to build. Form editors such as NetBeans Matisse or Eclipse plugin Jigloo can help you speed up the development time by providing a simple drag and drop form building. In this article we’re not comparing the form builders and in no way I'm saying that the mentioned form builders are better than others.

This article shows you how to installed CloudGarden's Jigloo plugin for Eclipse Galileo 3.5. The contents can be used also as a guide on how to install and remove plugins from Eclipse. Note that different versions of Eclipse may use different dialogs and include different options.

It is assumed that the computer you’re installing the plugin is connected to the Internet and have access to the following URI: http://cloudgarden1.com/update-site.

Install Jigloo Plugin

Eclipse provides a framework for its plugins. This simplifies the installation and removal process of plugins such as Jigloo. Open Eclipse, if not already opened. To add a new plugin, open the Help menu and select the Install New Software... menu item.

Help -> Install New Software

The Install dialog will open from where you can add and install new plugins. Click on the Add... button to add a new site from where the plugin is downloaded and installed as shown in the following screenshot.

Add Site

Add the site details in the small dialog, titled Add Site, displayed. Enter a friendly name (it can be anything you like) and the location from where the plugin will be downloaded and installed. The location for Jigloo is: http://cloudgarden1.com/update-site.

Enter Site Details

Click OK to continue. As shown in the following screenshot, the new site may not be listed in the work with dropdown list.

Work With dropdown list (without the Jigloo site)

In this case, close the dialog and reopen it from the menu Help -> Install New Software... as described earlier (click here for details) for Eclipse to refresh the sites list. The new site will be displayed in the work with dropdown list. Select the Jigloo site and click Next to continue.

Work With dropdown list (with the Jigloo site)

Eclipse will list all available plugins from the selected site. Select the Jigloo GUI Builder and then click Next > to continue.

Add Jigloo

Wait for Eclipse to calculate the requirements and dependencies. When ready, Eclipse will list the installation details. Click Next > to continue. Read the license agreement and only proceed if you accept it. Eclipse will download the required files and installed these when ready.

Wait for Eclipse to Download and Install

When ready, a dialog will be displayed suggesting restart of Eclipse. Click Yes to restart Eclipse. Wait for Eclipse to restart.

Create a JFrame

The main focus of this article is to illustrate how to install and remove Eclipse plugin Jigloo. The following online tutorial: http://www.cloudgarden1.com/swing_tutorial/index.html provides detailed examples of how to use this plugin to create Swing based forms.

To create a new JFrame, we first need to create a new project (unless you have one created already). Create a project or select an existing one. Then press Ctrl+N simultaneously to open the New dialog. Expand the GUI Forms node, then the Swing node and select the JFrame option as shown below.

New JFrame

If the form is greyed out (disabled) that means that you have not selected a project. Make sure you either select an existing project or create a new one before you proceed.

Provide a package name and a name for the JFrame. Note that names in Java must start with a letter, underscore or a dollar sign. Numbers can be included but not as the first letter. Press Finish to complete the process.

Package and Frame names

Eclipse will open the new frame for editing. Components can be added and removed graphically in a drag and drop manner. For more about this, please refer to the tutorial: http://www.cloudgarden1.com/swing_tutorial/index.html

Eclipse

Uninstall the Plugin

To uninstall a plugin, open the Help menu and select About Eclipse menu item. The about dialog will be displayed.

Click on the Installation Details button. The Eclipse Installation Details dialog will open. With the Installed Software tab selected, select the Jigloo plugin and click Uninstall….

Uninstall

Wait for Eclipse to calculate the requirements and dependencies. Click Finish on the Uninstall dialog to confirm the uninstallation. Wait for Eclipse to finish the uninstallation and click Yes when prompting to restart.

No comments:

Post a comment