Quick Tips
- Applets using Swing components
Most browsers do not support Swing components and other new JDK features. For best results, write your applet using the same JDK that the browser uses and use AWT components instead of Swing.
- Use Sun's Java Plug-in for applets
If you're writing your applets with the newer JDKs which most browsers do not support, use Sun's Java Plug-in.
- Different ways to run your applet
Right-click the applet HTML file in the project pane to run your applet in Sun's appletviewer. Select Run|Run Project to run your applet in JBuilder's applet viewer, AppletTestbed.
- Running applets with JDK 1.1 and JDK 1.2
Read the "Release Notes" (Help|Release Notes) for tips on running JDK 1.1.x and 1.2 applets in JBuilder.
- Compiling JBuilder projects from the command line
You can compile JBuilder projects using the command jbuilder -build <project-filename>
. UNIX users can include this command in makefiles for the ultimate in automated builds.
- JBuilder command-line arguments
Use the command jbuilder -help from the jbuilder/bin
directory to find out more about JBuilder's command-line arguments.
- Ctrl+right-mouse-click an expression to access ExpressionInsight
If the expression is an object, you will see the object with all its children, which are also expandable. If you hold down the Ctrl key and move your mouse around, ExpressionInsight will come up for anything that is a meaningful expression under the mouse. The window disappears when a key is clicked outside it, or if no actions are taken inside of it (similar to CodeInsight).
- Automatically go to the head of the debugging class
Use the Show Current Frame button while debugging to automatically take you to the class you are debugging.
- Increase debugging performance with the classic VM
For Windows only, in the current version of JDK 1.3, debugging using the classic VM is much faster than debugging with HotSpot. If you see a noticeable slowdown in your program when you debug it, try adding the -classic
option as the first VM parameter in your project before you debug.
- Getting help on properties
For help on properties, select the ellipsis (...) button to the right of the property value in the Inspector, if available, and click Help in the dialog box.
- Context help is available for components
Select a component in the component tree or the designer and select F1 for help.
- Cursor locations in the designer
When dropping a component in the designer, the status bar displays the cursor location and the name of the component that is currently selected.
- Designing with layouts
Design your UI in null
or XYLayout
using nested panels to group components. Convert panels to final layouts after you've finished assembling the components.
- Get help for methods
Context-sensitive help can be accessed using the F1 key with the caret over the method you want help for.
- Get help for Java keywords
Help on keywords can be accessed using the F1 key with the caret over the keyword you want help for.
- Match your braces
You can find matching braces by moving your caret to right before the starting/ending brace and hitting Ctrl + ] (you can select by holding down the Shift key when moving between braces).
- Auto-align your braces
You can auto-align closing curly braces from the Tools|Editor Options|<Editor tab>|<Indent Options branch>.
- Keymapping quick reference
You can access the listing of current keymappings using the Keymap Editor: Tools|IDE Options|Browser|Customize button and Tools|Editor Options|Editor|Customize button.
- Customize your keymapping with the Keymap Editor
You can use the Keymap Editor to customize the keymappings used for the Editor and IDE. Choose Tools|IDE Options|Browser page|Customize button or Tools|Editor Options|Editor page|Customize button.
- Make your comments
Use Ctrl+/ as a line comment toggle. Ctrl+/ adds comment tags (//) to the line of code the cursor is on or removes existing comment tags.
Highlight blocks of code and use Ctrl+/ to comment or remove existing comments on an entire block.
- Put CodeInsight to work for you
Use these timesaving CodeInsight features:
- Ctrl+H invokes MemberInsight (Brings up a context-sensitive list of available classes and methods for the current context).
- Ctrl+Space automatically completes class and method names as you type. Set the Autocomplete While Typing option on the CodeInsight page of the Editor Options dialog box (Tools|Editor Options).
- Ctrl+Shift+H or Ctrl+Shift+Space invokes ParameterInsight when inside the parenthesis of a method (Parameters expected for the method being coded).
- Ctrl+Enter invokes SymbolInsight ("Drills down" and opens the class/method the caret is over in the content pane).
- Ctrl+Alt+H invokes ClassInsight (Opens the Class Browser and shows classes accessible through the current class path). When you add a class using ClassInsight, the import statement is automatically added to your code.
- Quick coding with code templates
Use code templates to create @todo
tags and other code blocks (Ctrl+J).
- Code templates match your coding style
JBuilder's pre-defined code templates are formatted according to your project preferences. These options are set in the following locations:
- Braces: Project|Project Properties|Code Style page
- Block Indent: Tools|Editor Options|Editor page
- Code templates match your coding style
JBuilder's pre-defined code templates are formatted according to your project preferences. These options are set in the following locations:
- Braces: Project|Project Properties|Code Style page
- Block Indent: Tools|Editor Options|Editor page
Note: When you create or modify templates, JBuilder does not format it according to the preferences. You must manually set the braces and indents.
- Code templates
Code templates have a full set of anonymous listeners and adapters available, which makes it easy to add anonymous classes as listeners.
- Bookmarks, bookmarks, everywhere...
Use these bookmark shortcuts for easy navigation:
- You can set a bookmark in the editor by putting the cursor on a line and then pressing Ctrl+Shift+n (where n can be any digit from 0-9).
- To go to a bookmark, press Ctrl+n.
- You can turn off a bookmark by pressing Ctrl+Shift+n.
- Editor and IDE keybindings are editable
The keymaps selectable from the Tools|IDE Options|Browser and Tools|Editor Options|Editor pages can now be customized to match your personal needs.
- Put ParameterInsight to work
If the cursor is between the parenthesis for a method call, pressing Ctrl+Shift+H or Ctrl+Shift+Space brings up a list of valid parameters.
- Put MemberInsight to work
When editing source code, pressing Ctrl+Space brings up a list of classes, variables, and packages. MemberInsight also provides auto-completion whenever possible: try typing ArrayI
in a method and press Ctrl+Space to see what happens.
- JavaDoc @todo tags
The structure pane provides an easy way to browse through all the /** @todo */
comments in the current source file. Try it!
- The Many Uses of Browse Classes
Use Search|Browse Classes or the Browse Classes button on the toolbar to search for a class in an unknown package or to quickly view source for a class.
- Quick searching
Use Search|Incremental Search to quickly search in the editor. Enter the word in the Search For tool tip and use the arrow keys to search forward and back. Press Enter or Esc to exit.
- Search with Find In Path
Use Search|Find In Path to search multiple files. For example, find all the @todo
tags in your project or directory by entering @todo in the Text To Find field. The results are displayed in the message pane. Double-click a result to find the line of code in the editor.
- Modify the CodeInsight keys
CodeInsight keymaps are modifiable from Tools|Editor Options|CodeInsight|Keystrokes.
- Use CodeInsight on existing code
Use CodeInsight to find out about members or parameters without changing any code! For example, if you have System.out.println("");
in your code, position your cursor after the period of "out." Press Ctrl+Space to get the members of out
or position the cursor after the opening parenthesis of println("")
and press Ctrl+Shift+H to get the list of parameters.
- CodeInsight and variable names
If you need help with long variable names, type in the first few characters of the name and press Ctrl+Space. Your variable name is easy to find in the CodeInsight pop-up window.
- CodeInsight tips
When using CodeInsight, you can accept the currently highlighted selection in the CodeInsight pop-up window with the period (.) character. The selected name is automatically entered in the editor followed by a period. CodeInsight appears again for the next selection. This is useful for completing variable names with multiple embedded periods such as System.out.println
.
- Fast track to running your EJBs
If you want to run the container for the currently selected Application Server but don't want to have to go into the Project Properties to set up the settings, you can right-click an EJB group file, or the JAR file underneath it and select Run or Debug from the right-click menu. This will run the container for the currently selected Application Server using the JAR for this EJB group. If you want to use multiple JARS with this Application Server, you can select multiple EJB group files, and select Run or Debug. This will use all of the selected JARS to run the currently selected Application Server.
- Using your browser to view documentation
It's now easier to use your web browser to view the JBuilder documentation. Just unarchive all of the JAR files in the JBuilder doc
directory and point your browser to index.html
.
- Zoom your help topics
Use the Options|Zoom In, Options|Zoom Out, and Options|Zoom Normal to increase and decrease the size of the text in the Help Viewer topic window.
- Increase your productivity with Tip Of The Day
Quickly increase your productivity with JBuilder's Tip Of The Day. To open Tip of the Day, select Help|Tip Of The Day. To turn this feature off, uncheck the Show Tip Of The Day After Launching option and access it from the Help menu. For a categorized list of these tips, select Help|Quick Tips.
- Print to HTML
Using JBuilder's Print To HTML feature, it is easy to save a Java source file to an HTML file that matches the color scheme of your editor settings. Select File|Print and select the HTML File option. You can use this JBuilder-generated HTML file for several purposes:
- As a colorful code snippet Email attachment.
- As a colorful programming example on your web site.
- As a means for viewing Java code on your handheld device.
- Right-click your way to the menus
Many of the main menu functions are available when you right-click on items in the IDE, including the project pane, structure pane, content pane, editor, and many other locations.
- Showing and hiding the message pane
Ctrl+Alt+M toggles the display of the message pane, providing more screen real estate in the content pane.
- Showing and hiding the structure and project panes
Ctrl+Alt+Z toggles the display of the structure and project panes, providing more screen real estate in the content pane.
- Match as You Type
In the project, structure, and message panes, if you start typing, it does a "starts with" match. But you can use the * to do a "contains", e.g. "*data"; or use ? for a single character. The dot (.) locks you into the current branch. You can use the up and down arrows to move between matches.
- Backup Your JSPs With Your Projects
If you would like the backups for your JSPs to be stored in the project backup directory rather than the JSP directory, simply add an entry for the JSP directory to your project's source path.
- JDataStore supports the IN keyword
JDataStore clients can now use IN(val1, val2, val3)
to test for a match with one of three values. This is one of many SQL parser enhancements in the 100% Java relational database bundled with JBuilder.
- JDataStore supports the JOIN keyword
JDataStore clients can now use table1 FULL OUTER JOIN table2 USING column1
as a new syntax for joining table1 and table2. This is one of many SQL parser enhancements in the 100% Java relational database bundled with JBuilder.
- Visually modify table structures with JDataStore
Open a JDataStore in the JDataStore Explorer. Select a table in the tree, and click the Structure tab. You can add or drop columns, and/or change existing column's characteristics, such as their data type, size, etc. You can also visually create tables from scratch via Tools|Create Table.
- Import tables to a JDataStore
Open a JDataStore in the JDataStore Explorer. Select Tools|Import|Tables to import tables from any JDBC datasource. If you wish, you can make changes to your local copies of the tables and resolve the changes back to the original database. If you prefer to have your own program do this, use the DataStorePump and DataStoreSync components.
- Selecting the JDK for your project
You can edit the JDK for your project. Select Tools|Configure JDK. Select the JDK and click the ellipsis button next to the JDK Home path field to open the Select A JDK dialog box. Select another JDK and click OK in all the dialog boxes to close them.
- Switch Your JDK
Select Project|Project Properties|Paths. Click the ellipsis button next to the JDK field. Select a JDK from the list or click the New button to open the New JDK wizard and add another JDK to the list.
- Find everything you need in the libraries
JBuilder uses libraries to find everything it needs to run a project as well as for browsing through source, viewing JavaDoc, using the visual designer, applying CodeInsight, and compiling code. Libraries are collections of paths that include classes, source files, and documentation files. Individual library paths are often contained in JAR or ZIP files but can also be contained in directories.
- Add to your library
You can add a library in the Configure Libraries dialog box (Tools|Configure Libraries). Select New to use the New Library wizard to add a new library. Once a library has been added, you can add it to your project. Select Project|Project Properties. On the Paths page, click the Required Libraries tab, and click Add.
- Automatically add packages to your projects
You can automatically add packages from your package-name-hierarchies through the Project|Project Properties|General tab.
- XmlServlet provides quick access to JDBC databases
XmlServlet quickly provides web access to JDBC databases using any server that supports servlets, Tomcat included. In addition to XML reports, XmlServlet generates comma delimited, quote delimited, and fixed width reports.
- Resolve merge conflicts quickly
When you need to resolve a CVS merge conflict, right-click on the conflict. JBuilder gives you the option to keep the newer version or the older version of that area of conflict.
- Reconcile merge conflicts
Once a conflict is tagged, CVS no longer recognizes it as a conflict. However, if you compile the project, the compiler will give you a message locating the
@merge
conflict tags. Double-click the message to have your cursor dropped into the first conflict block. This way you can reconcile your merge conflicts at your convenience, not CVS's.
- Change your code style
You can change the style of JBuilder-generated code from Project|Project Properties|Code Style.
- Make localization of your application easier
You can prepare your application for translation by running the Resource Strings wizard.
- Quick XML data reporting
Use the command-line utility jsql
to produce XML output from a database query. UNIX systems can produce quick printed XML reports by typing jsql <sql-filename>|lpr
from a terminal window.
- XML and the editor
The editor automatically recognizes the "encoding" tag in XML headers and displays the XML file using this encoding tag. You can add multiple XML files with different encodings in the same project, and you don't have to worry about setting the project's encoding when adding XML files.