Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
TDMWeb Kylix Developer's Guide
 JBuilder 3 - Sneak preview
See Also: JBuilder Papers

A year ago Inprise released JBuilder 2. And that was a great improvement over version 1, and JBuilder 2 truly made programming Java applications easy. Now Borland.com is about to release a new version of JBuilder: JBuilder 3. Here we will show a sneak peak at some of the new features in JBuilder 3, that will make our programming life even easier.


Better help
The help viewer has been totally renewed. The help viewer is now all Java (so will be able to run on every platform supporting Java...). For showing the HTML in the help viewer Borland.com used the all Java HTML component from Ice Software. The help viewer now contains a menu with options like bookmarks and we can even open other URLs in the help viewer. Copying of text can now be done using the standard Windows keys. Another great improvement can be seen in the next screenshot:

Yes, the help viewer is now visible in the taskbar as a separate application and we can use Alt-TAB to switch between the help viewer and JBuilder 3!
We can now do full text search and when we search for a keyword and multiple topics are returned as a result, these topics are no longer shown in a dialog window, but are listed in the help window. The following screenshot shows the result when we search for the keyword JFrame:


Property editors
I wrote an article on using the Swing Border classes as components in JBuilder 2, so the borders would show up in the Visual Designer, and the properties could easily be modified. JBuilder 3 has gone a step further. We are now able to set the border property of the different Swing components using the Object Inspector. The property list contains some predefined borders:

But if we choose the Custom... options, JBuilder 3 opens a new dialog where we can create a new border object:

If we wanted to use images / icons in our Java applications, we had to keep some things in mind. One of them being not setting the icon property in the Visual Designer, because this would put JBuilder 2 on the spot. JBuilder 3 has resolved this issue, and now fully support the setting of the icon property:

And the result will be immediately visible in the Visual Designer:


Property exposure
The Object Inspector now supports three different property view modes:

By setting the exposure level we can customize the number of properties we want to be visible in the Object Inspector.


Tree view Visual Designer
The tree view of the Visual Designer in JBuilder 2 shows the components in a hierarchical manner. The icons for the components aren't very clear about what components we are using. Basically every component has the same icon. In JBuilder 3 that has changed. Every component in the tree view is represented by it's visual representation as seen on the Component Palette. This will give us more insight in the type of components we are using:


Drag-and-drop
The tree-hierarchy in the Visual Designer now support drag and drop. So we can easily select a component in the tree view, like the jToggleButton1 component in the next figure:

and start dragging the component to the jPanel3 component, because we want it to be placed on that panel:

and when we release the mouse button, jToggleButton1 is placed on jPanel3:

This will definitely speed up our development process, because we don't have to use the Cut, Copy, Paste commands.


BeanChooser
The Component Palette is a very useful tool in developing applications visually. But what happens when we have a special component we want to use in the Visual Designer just for one application? We must add this component to the Component Palette using the properties dialog of the Component Palette. We must give it a place somewhere on one of the tab pages, and it will stay there even if we don't use it anymore. JBuilder 3 will simplify this task, because JBuilder 3 introduces the Bean Chooser. We can find the icon next to the Component Palette:

When we press the button, a standard package browser dialog will open. Here we can look for the component and select it. Our selected component will now be quickly accessible from the BeanChooser button as a drop-down menu option. The following screenshot shows the result after we added the java.awt.Choice component with the BeanChooser:


Seeing the output of our application
I get a lot of questions about how we can see the output of our application on the system console once the application has ended. Because JBuilder 2 will automatically close the console we cannot see the generated output. In JBuilder 3, we now have a simple choice from the Project properties dialog:

In the Console I/O section we now can see an option called Close Console Window on exit. And we can check or uncheck this option just as we like. If the option isn't checked the console window will stay open even after the Java application has finished executing.

It turns out that this feature is available for true console-only applications only. If we are working on something that has a GUI it won't work. The feature was added, primarily, for programmers who are using true console-type programs (quite handy when learning Java programming, for example).
To truly have a console that sticks around in all cases would require a change in how java.exe works (and a big change in how the language is supposed to deal with "end of program" where main() falls out of scope). JBuilder 3 just tricks it for console only apps and the trick is overruled by anything with a GUI.


See also JBuilder 3 CORBA Support, and stay tuned for more JBuilder 3 news...
This webpage © 1997-2009 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.