GUI Builder: Update Pack for NetBeans 5.5
This update brings all GUI building features currently available in
NetBeans 6.0 development builds to NetBeans 5.5. So besides using daily
development builds or q-builds you can now get the latest
features (as of September 2006) into your last stable release! See
more details below. See also the roadmap for
a longer term outlook.
Note: There is also an earlier version of this update pack available for NetBeans 5.0
already since
June 2006. However, we recommend to upgrade to NetBeans 5.5 and use this latest update pack; it contains many additional bug fixes.
Installation
New Features
- 1. Automatic Internationalization
- 2. Visual Localization
- 3. Preview with Look and Feel
- 4. Relative Font Definition
- 5. Context Sensitive Help Bar
- 6. Reorganized Palette
- 7. Dragging Components from Projects Explorer
- 8. Support for Java 6 Layout
- 9. Pre/Post Declaration Custom Code
Installation Steps for NetBeans 5.5
Having NetBeans IDE 5.5 running, follow these steps:
- from main menu invoke Tools | Update Center,
- in the table of known update centers check NetBeans Update Center Beta
(uncheck the others),
- click Next, the IDE will connect to the update center and show all available updates,
- find GUI Builder Update Pack for NetBeans 5.5 under Features node,
select it and push Add button (all necessary modules will appear in the Include
to Install list),
- click Next and accept the license,
- wait until the modules are downloaded, proceed with Next button,
- make sure all modules are selected for installation (left column with
check boxes),
- press Finish button and let the IDE restart.
After the IDE restarts, the installation is complete and you can start using the new features.
Manual Installation (Alternative)
It is also possible to install the update pack from manually downloaded
files. Just download the files linked below and then in Tools | Update Center
select the option to Install Manually Downloaded Modules.
Uninstallation
If you ever wanted to uninstall this update, you can do it manually by
removing the files listed below.
$userdir$/config/Modules/
org-jdesktop-layout.xml
org-netbeans-modules-form.xml
org-netbeans-modules-i18n.xml
org-netbeans-modules-i18n-form.xml
org-netbeans-modules-properties.xml
$userdir$/config/org-netbeans-api-project-libraries/libraries-timestamps.properties
$userdir$/modules/
org-jdesktop-layout.jar
org-netbeans-modules-form.jar
org-netbeans-modules-i18n.jar
org-netbeans-modules-i18n-form.jar
org-netbeans-modules-properties.jar
$userdir$/modules/ext/
AbsoluteLayout.jar
swing-layout-1.0.1.jar
Note: $userdir$ refers to the user directory location where all the settings are stored. You can learn where
your user dir is located in Help
| About -> Details.
New Features
Important note about format upgrade: Some of the new features like the improved
internationalization or the new font editor require new data to be stored
in the GUI definition (.form file). In such case the format version
of the .form file will be upgraded and you won't be able to open the form in an earlier
version of NetBeans (i.e. in NetBeans 5.0 or 5.5 without the update pack).
1. Automatic Internationalization
Once turned on, this feature takes care about
internationalizing the designed GUI form automatically. All texts in
the form are moved to a properties file and appropriate code is
generated that uses ResourceBundle API for obtaining the text based on the actual locale.
To turn this feature on, select the root node of the form in the Inspector and
check the Automatic
Internationalization property.

2. Visual Localization
The GUI form can be translated to a different language
directly in the
designer. The GUI builder allows you to switch the locale used for
design, and also to create a new locale. Besides
comfortable translation this is also useful for previewing the GUI
appearance and behavior in different localizations. This can be done
via the Design Local
property of the root form node; see the picture above. New locale can
be created by clicking the [...] button.
See also this short internationalization demo.
3. Preview with Look and Feel
This feature allows to preview the designed GUI form in various look
and feels, both standard and custom ones.
A custom look and feel can be
installed to the palette from a JAR file. This can be done the same way
as installing JavaBeans components; the only difference is that the look and feels are not
displayed in the palette. To get this you need to install them to the Look
and Feels category in the palette manager.

4. Relative Font Definition
This feature allows to define font by deriving it from the default font.
The generated code does not contain the full definition (that includes the
font type which depends on platform/look and feel) but only changes you
made. This way you can have the modified font consistent on all
platforms. For example, if you want a bold font, the following code is generated:
label.setFont(label.getFont().deriveFont(label.getFont().getStyle() | Font.BOLD);
To use the relative font definition, just check the Derive the font from the default
font check box in the font property editor.

5. Context Sensitive Help Bar
This is a new component in the GUI designer displaying various hints
based on context (e.g. type of
component selected, type of actual operation, how a component
is dragged, etc). It can be quite useful for discovering features
available in various situations.

6. Reorganized Palette
The palette has been reorganized for better discoverability of
components. There are separate categories for common controls,
containers, windows and menu components now. Natural names of components
are used instead of class names (e.g. Tabbed
Pane instead of JTabbedPane).
Under Beans
category, there is a special Choose
Bean item that allows to pick arbitrary component class that is available
on the classpath.
The way of installing components to palette has not changed. So you can
right click the palette and invoke Palette Manager..., or achieve
the same from the main menu via Tools | Palette Manager | Swing/ AWT
Components.
Note that often you don't need to install your own components to
palette, you can just drag them from your project. See the next feature. |
|
 |
7. Dragging Components from Projects Explorer
This is a small, but very useful feature. If you have developed a
component, you can drag it directly from the Projects explorer and
drop it onto a form. (Note the component must be compiled.) You don't
need to package and install the component to palette if you don't plan
to use it often or in more projects.

8. Support for Java 6 Layout
With Java 6, the GUI builder is able to generate code
that uses only standard JDK classes. The additional Swing Layout Extensions
library containing necessary classes (GroupLayout and related) is
no longer needed since all the classes have been added to JDK.
Note that all existing GUI forms will keep using the library, but you
can change the code generation style if you move your project to Java 6
platform. The corresponding property is available on the root node of
the form in the Inspector. All newly created forms will generate Java 6
code preferentially (if the project is targeted to Java 6).

The layout library will continue to be used for older JDK
versions (Java 5). The latest version of the library is 1.0.1. It
contains various bug fixes compared to 1.0 and is functionally equivalent to the
Java 6 version. For more
information see http://swing-layout.dev.java.net.
Note NetBeans 5.5 already supports Java 6 code generation (unlike NetBeans
5.0), however it does not contain the latest version of the layout library,
which you
get with this update.
9. Pre/Post Declaration Custom Code
 |
|
A new type of custom code category has been added: pre and post declaration code.
This way you can mark a variable declaration by an annotation, for example. The code can be entered in the
Properties window on the Code tab (the same as the other custom code
options). |