Shortcuts to key JBuilder samples

Most of the samples which make use of tables in a database use JDataStore as the default SQL server. JDataStore is included with the Enterprise edition of JBuilder and is available separately for the JBuilder Professional edition.
JBuilder includes many sample projects which demonstrate use of its rich component library as well as use of Java base classes. The samples below are grouped by area. A brief description of each is included. Click on the sample name to load the project file into an AppBrowser window.

JBuilder samples are listed under the following areas:

NOTE FOR JBUILDER USERS ON SOLARISTM AND LINUX:

If you install JBuilder as 'root', but run JBuilder under your normal user account, you will not be able to run any of the samples directly from the JBuilder samples directory. Attempting to do so will result in a compile-time error, Error #: 914: unable to write to output directory. In order to run a sample project, you must have read/write access to all files and directories created or used by the sample.

A shell script named 'chmod_samples' is provided in the samples directory which enables the user who installed JBuilder to control access to the samples. It should be run from within the samples directory. For example:

% cd /usr/local/jbuilder/samples
% chmod_samples
Usage: chmod_samples [-verbose] full
            to allow all users to compile, run, and modify sample files
   or  chmod_samples [-verbose] run
            to allow all users to compile, run, but not modify sample files
   or  chmod_samples [-verbose] readonly
            to allow all users to read but not run or modify sample files

Alternatively, if you were not the user who installed JBuilder and you only have read-only access to the JBuilder samples subdirectory, you can copy the samples into a directory in which you do have read/write access to run the samples. Because some samples require files (e.g., databases) in other subdirectories of the samples directory, it is recommended that you make your own copy of the entire samples tree, if possible. Samples which try to access files in other samples directories write a message indicating the directory in which they expect to find a file. The message includes the name of the class trying to locate the required file. If necessary, you can edit that class to point to another location, rebuild, and re-run the project.

A simple way to copy the entire samples tree is to use the cp -R command. For example, to copy the JBuilder samples tree (assumed to be in /usr/local/jbuilder/samples) to a 'mysamples' subdirectory of your home directory, do the following:

% mkdir $HOME/mysamples
% cp -R /usr/local/jbuilder/samples/. $HOME/mysamples

Another way to do this which will show you files as they are copied (or if your version of 'cp' does not support the '-R' option) is:

% mkdir $HOME/mysamples
% cd /usr/local/jbuilder/samples
% find . -print | cpio -pdmv $HOME/mysamples


Welcome Project

The Welcome Project introduces you to the JBuilder user interface and provides quick access to the Release Notes, and shortcuts to key topics in the documentation, tutorials, and samples.


Swing

These samples run with all JBuilder editions.

CardLayout - Demonstrates two different ways to control a CardLayout panel, using JRadioButtons and a JComboBox.

CheckBoxControl - Uses JCheckBox and JCheckBoxMenuItem components to toggle a True/False state in a JTable column.

Password - Shows how to use a JPasswordField component.

Primes - Generates prime numbers and displays them in a scrolling JList.

SimpleTextEditor - The Swing version of a simple text editor that is capable of reading, writing, and editing text files.

TabbedPane - Shows how to use a JTabbedPane component.

TreeControl - Shows how to use a JTree control.


Tutorials

DebugTutorial - A tutorial on compiling, running and debugging. This tutorial contains introduced errors. To work through the tutorial and find and fix errors, expand the Tutorials book in the online help and choose "Compiling, running, and debugging tutorial." (This sample runs with all JBuilder editions.)

FirstApplet - A tutorial on creating an AWT applet. To create this applet by following the tutorial, expand the Quick Start book in the online help and choose "Tutorial: Building an applet." (This sample runs with all JBuilder editions.)

TextEdit - A text editor application that is capable of reading, writing, and editing text files. Includes creation of a simple UI design and hooking up of events to buttons and menus. To create this application by following the tutorial, expand the Tutorials book in the online help and choose "Building a Java tutorial." (This sample runs with JBuilder Professional and Enterprise.)

SimpleTextEditor - The Swing version of a simple text editor that is capable of reading, writing, and editing text files. To create this application by following the tutorial, expand the Tutorials book in the online help and choose "Building a Java tutorial." (This sample runs with all JBuilder editions.)



DataExpress

These samples run with JBuilder Professional and Enterprise.

Aggregating - Shows how to aggregate data with calculated fields.

BasicApp - A sample database application developed using DataExpress components and the JBuilder design tools.

Buttons - Shows use of default, minimum, and maximum constraints and mapping values from a button control to a Column.

CalculatedColumn - Creates a calculated column in the designer.

CustomToolBar - Uses JdbTable and a JdbNavToolBar with customized buttons that "drill down" (show detail records for the current row) and "roll up" (return from the details to the master dataset).

FilterRows - Shows how to use a data set's RowFilterListener to view only rows that meet the filter criteria.

JDBCBenchmark - Basic test suite used to compare performance of DataExpress components against raw JDBC calls for retrieval, update, delete, and insert of data.

LocatingData - Shows how to set a particular column for the locate operation as well as using a JdbComboBox component to enable the user to select the column in which to locate the value.

Lookup - Shows how to use the lookup() method of the DataSet class in conjunction with the calculated column feature.

MasterDetail - Demonstrates how to setup two data sets where one acts as the master to the other.

NTier - Simple example of 3-tier distributed computing using RMI and DataExpress components. Features a stateless server and transactional business logic.

ParameterizedQuery - An example of performing parameterized queries with a QueryDataSet component.

IntlDemo - The Borland Multilingual International Store, showing an internationally enabled application using dbSwing and DataExpress components.

Picklist - Shows how to provide values to a column using a picklist to enter a new value to a column.

ProviderResolver - Shows how to create your own custom provider, which can be used as a provider for a TableDataSet or any DataSet derived from a TableDataSet.

QueryProvider - Shows how to query a database using the JBuilder user interface.

QueryResolver - Explores the basic resolver functionality provided by the DataExpress package.

ResolverEvents - Demonstrates events that occur when resolving changes back to a (database) data source, and how to use these events to customize resolver event processing.

ServerSpecificProcedures - Demonstrates the use of the DataExpress ProcedureDataSet and ProcedureProvider components to utilize stored procedures on an SQL server.

SimpleStoredProcedure - Shows how to provide data to an application using JBuilder's UI designer and a ProcedureDataSet component.

StreamableDataSets - Demonstrates distributed computing using RMI and StreamableDataSets. This example also shows how to write customized Providers and Resolvers.

TextDataFile - Sample application that explores basic database concepts and JBuilder's DataExpress architecture without the need for a remote database.

TextFileImportExport - Shows how to provide data to an application using a TableDataSet component and a comma-delimited text data file.

TwoTier - Provides a framework that promotes code reuse with clean separation points for application development roles including: transactional, entity, and presentation logic.


dbSwing

These samples run with JBuilder Professional and Enterprise.

Buttons - Shows how JdbCheckBox, JdbToggleButton, JdbRadioButton, or JdbSlider can be used to display and edit the contents of a column that has only a small number of valid values.

CustomToolBar - Uses JdbTable and JdbNavToolBar to customize with buttons that "drill down" (show detail records for the current row) and "roll up" (return from the details to the master dataset).

HtmlViewer - Shows how to build a simple help viewer using a JdbNavTree and a JdbEditorPane. Includes a simple cell renderer. Demonstrates the use of an Object column in a dataset as a cache for HTML pages.

IntlDemo - The Borland Multilingual International Store, showing an internationally enabled application using dbSwing and DataExpress components.

PickLists - Defines a picklist according to the options you select and lets you see that picklist in action using dbSwing controls. Demonstrates custom StatusEvent handling using JdbStatusLabel and discusses exception handling alternatives.

TextPane - Uses Swing JInternalFrames to display product descriptions from the IntlDemo sample application.


JDataStore

These samples run with JBuilder Professional and Enterprise.

BasicJDataStore - Demonstrates basic usage of JDataStore database using the JDatastore JDBC driver and the DataExpress Java bean components.

dsbasic - Code and data created for with tutorials in the JDataStore Programmer's Guide.

HelloJDBC - Demonstrates how to create a JDataStore file and connect to it using the JDataStore JDBC driver.

OfflineEditing - Uses a local JDataStore component to enable offline editing of data from a remote database.

WebBench - Creates a set of large sample tables in a JDatastore, runs transactions on multiple concurrent connections, and reports on throughput.



Online Store

These samples run with JBuilder Enterprise.

CreditCardApprovalApplet - An example of a credit approval/credit card issuing system for a fictitious company selling outdoor adventure gear.

OrderEntry - An example of an order entry system for a fictitious company selling outdoor adventure gear.

OrderTracker - A simple illustration of a database-aware applet/application that allows data entry of an order tracking number for an order created through the order entry application and retrieval of status information for the order.



JavaServer Pages

This sample runs with JBuilder Enterprise.

ShoppingCart - A simple shopping cart application that uses JavaServer Pages.



SQL

These samples run with JBuilder Professional and Enterprise.

AppletToServlet - An applet built with DataExpress components and a servlet based on DataExpress components that communicate with each other.

jsql - Samples to use with the jsql command line tools.

SqlQuery - An SQL query processor.



Distributed

StreamableDataSets - Demonstrates distributed computing using RMI and StreamableDataSets. This example also shows how to write customized Providers and Resolvers. (This sample runs with JBuilder Professional and Enterprise.)

NTier - Simple example of 3-tier distributed computing using RMI and DataExpress components. Features a stateless server and transactional business logic. (This sample runs with JBuilder Professional and Enterprise.)

SimpleRMI - A simple RMI application. (This sample runs with JBuilder Professional and Enterprise.)

Chess - Contains a client and server for the samples.chess.client.ChessViewer sample. This an actual chess game that supports play between players on different machines.



OpenTools API

Actions - Demonstrates an action to display a simple greeting in a modal dialog.

CommandLine - Demonstrates how to register a JBuilder command-line option.

CurlyBraceKeyBinding - Shows how to add a keybinding to complete curly braces.

Designer - Examples for writing Designers in JBuilder.

File Differences Viewer - How to implement a viewer that shows differences between two files.

EditorStats - Adds a tools menu item and hooks it up to a dialog with editor statistics.

PackageTree - Builds a hierarchical tree based on the package of a .java node selected in the project.

ReadingSource - Reads a jot source file.

WritingSource - Writes a jot source file.

LayoutAssistant - Sample Assistant for wiring a layout manager in the UI designer.

LineCommentHandler - Show how to change a keybinding and make it talk to the editor.

DynamicClassLoader - IDE extension that tests an OpenTools program.

ModifyCaret - How to change the shape of the caret.

ModifyKeyBinding - How to change keybindings in all the editor emulations.

NodeDemo - Shows how to use nodes.

PropertyEditor - An example property editor that has special knowledge of the Design environment.

BRIEF Editor Key Bindings - An example that shows how to make a Brief emulation.

Emacs Editor Key Bindings - An example that shows how to make an Emacs emulation.

CUA Editor Key Bindings - An example that shows how to make an CUA emulation.

Version Control System - Shows how to configure an external version control system.

Delphi - An example TextFileNode viewer using custom syntax highlighting and generating structure pane content.

ImageViewer - An example non-text FileNode viewer.

Find String - An example of a wizard using the MessageView.

Gallery - An example of an object gallery wizard using a PropertyGroup.

Package Wizard - Adds an Add Packages wizard to the Project Pane popup menu.

Simple Wizard - An example of a simple wizard.



Additional samples

NativeExample - Shows how to integrate native methods written in C in to Java programs using Borland C++ or C++Builder. There is no JBuilder project file for this sample. See the readme.txt file for more information. (This sample runs with JBuilder Professional and Enterprise.)

BeanCustomizer - A simple sample Bean that demonstrates the use of default editors, new enumerationValues item in JavaBeans, a simple customizer, bean reloading, property hiding, property "renaming" and more. (This sample runs with JBuilder Professional and Enterprise.)