From the help file comes this opaque introduction. AppBrowser is a Borland word to describe the three-paned multimodal window that is basically your workspace. What isn't immediately clear, is that you can have several of these open at once. One of these can contain the Help system. All can be resized and or minimised. Imagine the scope for clutter on-screen!
This chapter pays particular attention to the AppBrowser. After reading this chapter you will understand how to use the different modes of the AppBrowser to navigate through your programs, projects, files, packages and code elements. You will also understand how to drill down into code elements like classes, methods and interfaces to see their deeper structure. Because program development in JBuilder is centered around the AppBrowser, we recommend that you read this chapter before reading the rest of the User's Guide.
First we will consider the "rest" of the JBuilder environment - the main window. As you step into this you will have the sensation I get whenever I get off a train in London - a multitude of things grabbing your attention, followed by a sinking feeling as you lose track of your objectives. Then comes a sense of failure that there is so much important stuff out there that you will never have cause to meet.
The main window is at the top of the screen when you open JBuilder. It is similar to the control area of any Office or Authoring tool, with exception of the paged display for many different components that you can drag and drop into your application - The Component Palette. The tool bar contains a number of buttons for running your application and file management - essentially duplicates of the menu options. Place the mouse pointer over any button, without clicking, to see the flyover label describing the function.
The menu bar is at the top of the main window. You can select a menu command, then press F1 to display context-sensitive help. In fact you can do this in many different parts of the programme, under different circumstances. That is the idea of context-sensitive help - you find out something that is relevant to what you are trying to do.
The following table provides brief descriptions of menu commands, as taken from the help file in italics, with my commentary in normal type.
| Commands for... | |
| File Menu | Creating, opening, closing, renaming and saving files and projects; setting project properties; removing files from projects; configuring printers; printing files. Clearly the notion of a project as a group of files to be managed is key to using this menu effectively |
| Edit Menu | Copying, pasting, deleting, and selecting text; undoing and
redoing actions.
Consistent with other tools. Remembering to use Undo whenever you make a mistake will save a lot of wasted time trying to correct in other ways. |
| Search Menu | Finding and replacing text; searching for text incrementally and by line number; searching for text across a source path; searching for a symbol. Use this intelligently. You don't need to search for full phrases - type the most significant part of a string (a string is simply group of letters) , for example the end of one word and the beginning of the next, or a word with punctuation. |
| View Menu | Viewing Debugger windows, a new AppBrowser, the next or previous error message, the toolbar, the Component Palette, or other currently open AppBrowsers. If your computer has not enough memory to run Jbuilder and a browser simultaneously, then this is your option for |
| Build Menu | Making or building the selected node. As you build larger projects, it can take a while to build your application. With several thousand files to check, and to compile only those that have changed (or whose "dependencies" have changed), the fact that this can be done in a few seconds is revelation to anyone who wrote C or Pascal five years ago. |
| Run Menu | Running an application or applet; stepping over or tracing into code; running to the end of a selected method; pausing the program; setting watches or breakpoints; inspecting, evaluating, and modifying. The application/applet can't run until it is built, so be patient. Debugging too is almost an art form. Some programmers get a real detective thrill from finding the elusive bug. It's all about elimination of possibilities. You can interfere with your code while it's running. Needless to say this can also crash your machine. |
| Wizards Menu | Running wizards for tasks such as implementing an interface, overriding a method, bundling resources, migrating data, and examining a JavaBean. Wizards have gone through a revolution in the last few years. Once they were irritating and limited. Gradually they have been refined to the point that if you learn exactly what they do - what response to make to each of the options - you have powerful levers at your command. Use them to act in a strategic, managerial way. The wizards described above will only become relevant at the most advanced level, but the project and application wizards (called when you select File, New), create instant code and structure for you. |
| Tools Menu | Displaying the Environment Options dialog; invoking the Windows Notepad and Calculator; invoking remote object creation tools; and setting default properties for new projects. This menu is a combination of personal convenience tools, coupled with the types of controls that a project manager might set for a large number of programmers. Don't get lost in the complexities. Use these on a need-to-know basis. |
| Help Menu | Displaying documentation, such as the Help system, Creating JavaBeans with BeansExpress, the JDK API Reference, and the JBCL Reference. Also for viewing the INPRISE Online web site in your default web browser, loading the Welcome project for experimenting, and seeing information about this release of JBuilder. Since this menu leads to tens of thousands of pages of help-files, you have to focus on navigation - adopting a "Just-in-time" approach to getting assistance. Realise that you will need to read and remember only a few hundred of these, even if you use Jbuilder regularly. |
Borland's introduction stresses productivity and management, and the AppBrowser becomes like set of work-clothes that you put on to tackle a well-defined job. This is disorienting if you don't actually know what you are trying to achieve yet.
JBuilder is structured to increase your productivity as a Java developer. Because Java projects use many files, and because the various development tasks (such as editing, debugging, and browsing for information) have traditionally used multiple windows, it can be difficult to find the window you need.
To simplify your job, JBuilder introduces a new concept in user interfaces for development environments: a single AppBrowser that is used to perform all the usual development functions. The JBuilder AppBrowser lets you to explore, edit, design, and debug all in one unified window.
The JBuilder AppBrowser usually fills the screen area below the main window. If you are running JBuilder, and don't have an AppBrowser displayed, choose Help|Welcome Project now to view it. The AppBrowser will look like the figure in the section called Starting JBuilder.
The AppBrowser usually contains three panes:
Although you will usually have only one AppBrowser visible, you can open additional AppBrowsers as needed, for example, to view more than one project at a time.
Modes are states in which an interface can be. Think of these as toggled windows or desktops that you can swap between as you tackle a variety of tasks. Undoubtedly, some tasks can be tackled in several modes, and a strength of this interface is that (just like Dreamweaver) a change in one mode will change the content in another mode.
The AppBrowser has two sets of tabs to control the type of view you see. One set is at the bottom of the Structure pane and the other set is at the bottom of the Content pane. Different tabs appears, depending on what you are doing.
The browser as a whole is called the AppBrowser. When you switch the AppBrowser into a different mode, such as Project mode, you can think of this as the Project Browser.
Clearly the AppBrowser is a master of disguises! In fact it takes on different personalities in each of the following. Perhaps it's best to get to know them one at a time. The tutorials lead you through a number of modes. Beware also that clicking on a tab to swap modes, can lead to delays or even the programme hanging, as Java or JBuilder fails to resolve an internal problem, or an error in your code. Rapid clicking will also lead to this state.
The AppBrowser can display the following modes:
To return to the starting state to see your code, click the Project tab, then the Home button.
JBuilder's documentation describes the panes in clockwise order - Navigation, Content, Structure. I find it easier to think in terms of increasing detail - Navigation, Structure, Content, and have sequenced the descriptions below accordingly.
This allows you to focus on one top level part of your programme at a time.
The Navigation pane is the top left pane of the AppBrowser. This pane shows a list of one or more files. If you are looking at a project in the Project Browser you see the project (.jpr) file first. Attached to that is a list of the files in the project. The list may include .java, .html, text, or image files.
You can select a file in the Navigation pane by clicking it. The Content pane and the Structure pane display information about the selected file. As you select different files in the Navigation pane, each one will be represented in the Content and Structure panes.
The lower left pane of the AppBrowser shows you structural information about the file selected in the Navigation pane in a hierarchical tree. For a java file this would include: imported packages , classes, interfaces, ancestor classes and/or interfaces, variables and methods. This lets you see the detailed content of the file selected in the Navigation Pane. Whatever you select in the structure pane usually dictates what is represented in the content pane. You can also "drill down" into the code, in a similar way to Authorware. Doubleclicking on a class takes you into the code for the class. You eventually get down to Sun or Borland code.
This is where you look at the lowest levels of detail (although you will encounter the Inspector window which works at a very low level in a highly structured way). The representation of the content and the tags at the bottom of this window change according to what you have selected in the other panes. This can make it quite difficult to get used to, but once you do you will feel a sense of power over your environment.
The Content pane displays the detailed content of the file selected in the Navigation pane.
The following table lists the editor or viewer used in the Content pane. The editor or viewer is determined by the extension of the file selected in the Navigation Pane
| File Type | Editor(s) or Viewer (s) available in the Content pane |
| Text files | If you select a text file in the Navigation pane (a file with an extension such as .txt or .bat), an editor, identified by the Source tab, is available in the Content pane. This is a simple text editor that lets you to see and modify the text file. JBuilder recognizes certain file extensions (such as .txt and .bat) as text files. However, you can extend this list. |
| Image files | If you select a .gif, .jpg, or .bmp image file in the Navigation pane, an image viewer, identified by the View tab, is available in the Content pane. |
| .html files | If you select an .html file in the Navigation pane, two tabs
are displayed at the bottom of the Content pane, labeled View and
Source.
View tab: The View tab selects an HTML viewer. This viewer lets you see the rendered HTML file, as you would see it in a web browser. Source tab: The Source tab selects an Editor that lets you see and edit the file as raw HTML source |
| .java files | If you select a .java file in the Navigation pane, you see
four tabs labeled Source, Design, Bean, and Doc.
Source tab: When you select the Source tab when viewing a .java file, you see the JBuilder Editor. This is a full-featured, syntax-highlighted programming editor, with several popular keymappings. Design tab: When you select the Design tab when viewing a .java file, you see the JBuilder's UI Designer. For example, if you select the WelcomeFrame.java class in the Welcome project (or a Frame class in your own project), you see the JBuilder UI Designer in the Content pane. This designer shows what the UI appearance of this class will be at runtime and lets you visually construct and develop your UI. Bean tab: When you select the Bean tab, you see the BeansExpress designers. The Bean tab exposes the BeansExpress Property, Event, BeanInfo, and Property Editor designers. Use them to add properties and events to your bean, choose what properties are exposed, and create custom property editors. Doc tab: When you select the Doc tab, you see the corresponding reference documentation for that .java file, if documentation exists. Reference documentation is provided in HTML format. The display of reference documentation is based on the fully qualified class name and on settings in the jbuilder.ini file. The following reference documentation is provided with JBuilder: JavaSoft JDK Reference , JFC Swing Documentation, JBCL Reference, Selected third-party packages |
You can expand the Content pane to fill the entire AppBrowser window. You simply toggle it in and out of full window mode with the View|Toggle Curtain menu command or with the shortcut keys (Alt+Z in the default keymapping). When the Content pane is expanded, the Structure and Navigation panes are hidden. You can also use the mouse to resize the window or any of its panes by dragging the pane boundaries.