HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML

Around the time Java made its mark on the world of programming there came to be another phenomenon, the IDE. Gone were the days of typing code, compiling, wondering what went wrong, typing more code, recompiling and so on. The IDE presented the application builder with an unprecedented tool, useful not only for application building but for learning as well.

I found I could learn more about Java code when I started using IDEs. I'd use the drop-and-drag editor to add something to an existing application, compile and run it, then look at the source code to see what I'd just done. It provided a neat little shortcut to learning more about objects, events and such. I've had the opportunity to work with most of the IDEs that have come our way in the past couple of years, and always tried to see what I could learn from them.

Recently I was given the opportunity to work with JBuilder from Inprise. Not only did I think it was a good application development tool, I found it exceptionally useful as a learning apparatus as well.

System Requirements

  • Intel Pentium/90 MHz or higher
  • Windows 95 or NT 4.0
  • 48 MB of RAM (64 MB or higher recommended)
  • 100 MB of hard disk space (minimum install)
  • CD ROM drive
  • SVGA or higher resolution monitor (800x600)
  • Mouse or other pointing device
I installed on a Cyrix 150 with Win95 and 64 MB of RAM. The installation CD has an "Auto Run" file that brings up a menu as soon as the CD is placed in the drawer. The standard Installation Wizard made installing JBuilder as easy as pie!

Finding Your Way Around
I found JBuilder remarkably user friendly. Upon opening, I was greeted with a friendly "Welcome Screen" that, if necessary, can guide the user through a series of "Welcome Projects," as seen in Figure 1. These made getting familiar with JBuilder quick and easy. The projects consist of a couple of quick applications built as tutorials. After using them, even an inexperienced Java programmer will have the confidence to use JBuilder. Any last-minute pointers or changes from the previous version are presented in the Welcome Screen as well.

Figure 1
Figure: 1:

The Welcome Screen is displayed in what is known as an "App Browser," a window that allows you to "browse" through all the files and projects created with JBuilder. It allows you to browse, edit, design and debug these files. The App Browser contains three panes:

  • The Navigation Pane: Located on the upper left of the screen, it displays a list of files that may include .java, .html, text or image files. If a project is made current, the Navigation Pane will also display the .jpr files (the default extension for JBuilder projects).

  • The Content Pane: Located on the right side of the screen, it displays the detailed contents of the file selected in the Navigation Pane. This pane has various types of viewers at its disposal, the use of which depends on the file selected. For example, selecting a text file in the Navigation Pane will prompt the Content Pane to display that file in a text editor, similar to the Windows Notepad. If an image is selected, say a jpg, an image viewer is opened and displays the file. If the image needs to be changed before use in your application, you'll have to do that in another editor, as the JBuilder image viewer doesn't have editing capabilities. The Content Pane gets interesting when a .java file is selected from the Navigation Pane. In this case four tabs are displayed on the bottom of the pane: the Source Tab selects the JBuilder Editor, a syntax-aware programming editor that features several key mappings; the Design Tab calls JBuilder's UI Designer (see Figure 2), which shows how user interface of the class will look at runtime (here it's possible to visually construct and alter your application); the Bean Tab exposes the BeansExpress Property, Event, BeanInfo and Property Editor designers used to add properties and events to your bean, choose what properties are exposed or create custom property editors; the Doc Tab displays the corresponding reference documentation for that .java file if available (given in HTML format).

Figure 2
Figure 2:

  • The Structure Pane: Located in the lower-left pane of the App Browser, it shows structural information about the file selected in the Navigation Pane. If a .java file is selected in the Navigation Pane, for example, the Structure Pane will show imported packages, classes and interfaces on the file, ancestor classes, variables and methods (given in the form of a hierarchical tree). When one of the structural elements is clicked, the Content Pane will move to and highlight that element in the source code. This comes in handy as a way of finding elements in the .java file.

    Above the App Browser is the Main Window, which contains all the necessary tools for application development. Among them are:

    • The Toolbar: Provides shortcuts for some of the menu commands such as Open, Close, Save File, Undo, Redo, Search Replace, Run and Debug.
    • The Component Palette: Displays components used in the design. Components can be added to the existing pages or new ones can be created for them. Some of these are JBCL, JBCL Containers, dbSwing, Swing Containers, AWT and the KLGroup.
    • The Status Bar: Appearing at the bottom of the Main Window, it displays file save and compilation progress messages.
    Using JBuilder
    After taking a few minutes to get comfortable moving around in JBuilder, I found it just as easy to develop applications in it. Let's develop a quick, basic application just to get a feel for how easy it can be to use.

    First you open a new project by clicking File-New and then double-clicking the Application icon. There"s an icon for applets too, if that's your choice. This will open a simple dialog box that contains five fields. In the top field type the entire path to the location of the project files (for example, C:\JBuilder\myprojects\project1\project1.jpr). The other four fields are for title, author, company and a brief description, if you so desire. After these fields are filled in click Finish, which will generate the .java files that go into the project "skeleton." If the applet Wizard is used, a corresponding HTML file will be generated as well. Clicking Finish on this dialog box will then open the Step One Wizard dialog box, which requires you only to enter the name of your class in the appropriate field. There are two checkbox options: "Use only core JDK and Swing classes" and "Generate header comments." Clicking Next opens the Step Two dialog box. If you're building an application rather than an applet, here's where the window properties are set. The checkbox options here include "Generate menu bar," "Generate tool bar," "Generate status bar," "Generate about box" and "Center frame on screen." Upon clicking the Finish button, new .java classes are added to the project.

    Now it's time to use the UI (user interface) Designer. Clicking the newly created .java file in the Navigation Pane will bring up the source code in the Content Pane. Clicking on the Design Tab will bring up the UI Designer. Here it's possible to assign menu options, generate text fields and add buttons or dialog boxes. Events and properties are easily assigned by clicking the appropriate tab on the Component Inspector on the right-hand side of the Content Pane.

    More Than Just a Beginner's Toy
    Up to now, I've gone on about how easy it is to use JBuilder. Don't let this mislead you. Although JBuilder can be very simple to use, it includes a powerful arsenal of tools for the advanced builder as well. Some of the more sophisticated tools allow you to:

    • Create distributed applications with Java RMI.
    • Define CORBA interfaces with Java.
    • Create data-aware components.
    It's getting to the point where choosing an IDE can be a mind-boggling task. It's really impossible to sit down and try them all. JBuilder is an excellent choice for both the beginner and pro. Use it for a while and you'll agree; there's no need to look any further.

    About the Author
    Edward Zebrowski is a technical writer based in the Orlando, Florida, area. Ed runs his own Web development company, ZebraWeb, and can be reached on the Net at [email protected]


    All Rights Reserved
    Copyright ©  2004 SYS-CON Media, Inc.
      E-mail: [email protected]

    Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.