JBuilder Essentials
The Developer's Guide to Java Programming with Borland's JBuilder

by

Cary Jensen, Blake Stone, & Loy Anderson

Osborne/McGraw-Hill, 1998

(US) $ 39.99. ISBN 0-07-882223-8

Order your copy today from Amazon.com

Table of Contents

1 Overview of Java

Overview of the JBuilder IDE
The Main Window

The Object Gallery
Using the Object Gallery to Create a Simple Project
The AppBrowser
Compiling and Running the Project

Getting Help from JBuilder's Online Help

2 Understanding Objects in JBuilder

Overview of Objects
The Benefits of Object-Oriented Programming
Objects in JBuilder

Declaring the Class
A Variable Declaration
Method Declarations
Viewing the Class Structure
The Example Frame Class
Importing Packages and Classes

The Frame1 Class
Local Variables

Adding Methods

Using the Class Wizard
Overriding Methods
Using the Override Methods Wizard
Interfaces
Interface Overview

Using the Implement Interface Wizard

3 Building a User Interface

Frames Created by the Application Wizard

Status Bars

Displaying Text in a Status Bar
Customizing Menu Bars
Using the Menu Designer

Menu Item Event Handlers
Popup Menus
Adding a Popup Menu

Displaying a Popup Menu
Popup Menu Event Handlers
Button Bars
Creating Buttons

Button Bar Event Handlers
Manually Placing Button Bars and Status Bars

4 Controlling Frames and Dialogs

Using Frames
Adding an Additional Frame to an Existing Application

Controlling a Frame
Creating a Pseudo-Modal Frame
Controlling Child Windows
Using Dialogs
The About Dialog

Dialogs from the Component Palette
Using the Object Gallery Dialogs
Creating Custom Dialogs

5 Visual Design Using Layout Managers

Layouts and Constraints
Selecting a Layout Manager

Placing Components
Changing Component Placement
Editing Constraints
Component Sizing Hints for Layouts
Sample: Creating a Basic Interface

The Standard Java Layout Managers

BorderLayout

CardLayout
FlowLayout
GridLayout
GridBagLayout
Borland's Additional Layout Managers
XYLayout

PaneLayout
Advanced Layout Concepts
Multiple Layouts with Nested Containers

Adding Components to a Container at Runtime
Converting Between Layouts
Sample: Creating a Complex Interface

6 Building and Testing Applets

The Purpose of Applets
JBuilder as an Applet Development Tool
The Parts of an Applet
The Applet Class

The HTML <APPLET> Tag
The AppBrowser and HTML Files
Running an Applet
The AppletViewer Program

Web Browsers That Support JBuilder Applets
Applet Parameters
Defining Parameters from HTML

Reading Parameter Values
Describing Parameters
The Applet Wizard
Step 1: The Applet Class

Step 2: The Applet Parameters
Step 3: The HTML Page
A Sample Applet Wizard Applet
Making the Choice: Application or Applet
Applet Security Restrictions

Applet Methods
AppletContent Methods
Hybrid Applets
A Hybrid Applet Framework

7 Database Basics

Understanding Databases
Databases and Tables

Creating Tables
Overview of JDBC
JDBC Drivers

The Provide-Resolve Model of Data Access: DataExpress
JBuilder's Database Components
Data Access Components

Data Aware Components
Data Modules
Preparing JBuilder for Database Access
Installing InterBase

Configuring the InterBase ODBC Driver
Building a Simple Database Application
Defining the User Interface

Adding and Configuring the Data Access Components
Connecting Data Aware Components to the Dataset
Using the Database Application

8 Using Database Components

Using a Data Module
Sharing a Data Module

Using Multi-Instance Data Modules
Creating Database Modules
Creating Data Modules that Share a Database
Creating Master-Detail Views
Creating a Single-Frame Master-Detail View

Creating Master
Multiple Frames

Configuring Data Controls

Requiring User Login

Sorting Data
Using DataSetView Components
Creating Persistent Columns
Using the LocatorControl

9 Programming Database Functionality

Preparing for this Chapter's Examples

Saving Data

Detecting Unresolved Rows

Saving and Canceling Changes
Navigating a Dataset
Basic Table Navigation

Editing a Dataset
Customizing Data Views
Switching Between Dataset Views at Runtime

Calculated Fields
Filtering Data
Customizing Queries
Defining Query Strings

Parameterized Queries

10 Creating and Using Threads

The Multithreaded Code Trade-Off
Multithreading Benefits

Multithreading Pitfalls
JBuilder and Multithreaded Development

Multithreaded Development in Java

The Thread Class

Sample Threaded Project
Thread-Safe Development
Synchronized Methods

Synchronized Code Blocks
Performance Considerations
Deadlocks
Managing Threads
Starting and Stopping Threads

Controlling Thread Priorities
Daemon Threads
The Timer Class
Sample Timer Project

11 Debugging JBuilder Applications and Applets

Debugging Basics
Runtime and Logic Errors

Preparing for a Debugging Session
Creating a Sample Buggy Application
Starting the Debugger

Debugging Applets
Stopping the Debugger
The Debugging Interface: Debug and Watch Tabs

Following Code Execution

The Execution Point

Controlling Execution
Selectively Disabling Method Tracing
Threads and Execution Stacks

Using Breakpoints
Examining Data
Examining Local Variables and Parameters

Watching Expressions
Data Inspectors
Viewing Object Fields and Array Elements, and Modifying Data
Evaluating and Modifying Expressions
Fixing the Buggy Sample Application
Defensive Programming: Testing Invariant Conditions
The Exclude Class Compiler Option
Tips for Common Java Problems
Unhandled Exceptions

Finding Logic Errors
Problems in Foundation Technology
Abnormally Terminating a Java Application

12 Deploying Java Applications and Applets

Deployment Concepts
Loading Classes: The Class Path

Loading Resources
Distribution Efficiency
Redistribution Licensing
The Deployment Wizard
The Deployment Wizard's Limits
Deploying Applications

Deploying Applets

Single Archive Applets

Multiple Archive Applets
Individual File Applets
Combining Techniques
Advanced Deployment Topics
Database Applications and Applets

Deploying for Java 1.02

13 JavaBeans Basics

The JavaBeans Standard

Component Technology Overview

Component Philosophy

JavaBeans Concepts: Design Patterns
JavaBeans Terminology
The Bean Info Alternative
Using Beans in JBuilder
Creating Bean Instances

Using Bean Properties
Understanding Bean Events
Advanced Bean Features
Indexed Properties

Bound Properties: Detecting Changes
Constrained Properties: Validating Changes
Customizers
Installing JavaBeans Components
Modifying Pages of the Component Palette

Installing Beans from Archives
Installing Beans from Class Files
Converting Applets into JavaBeans

14 Writing JavaBeans

Component Writing Philosophy
Ease of Use

Robust Components
Consistency Among Components
Component Writing Overview

Defining the Class

Picking a Parent Class

Defining a Class with BeansExpress
Sample Component Development Using BeansExpress
Testing the Sample Component
Defining Properties
Adding a Property to the Sample Component
Defining Events
Dispatching Action Events from the Sample Component

Tips on Defining New Events
Bean Info Classes
Using BeansExpress to Define Bean Info Classes

Defining Bean Info for the Sample Component
Property Editors

15 The Model-View Architecture

JBCL Component Philosophy

Separating Models and Views

A Shared Model

Using the Lightweight View Components
JBCL's Four Basic Models
Model Interfaces and Classes

Creating a Custom Model
Learning More About Models
Suppressing Model Change Events

View Managers: Dealing with Disparate Data Types

Life Without View Managers

The TypedViewManager Class
Managing Selection and Subfocus
The JBCL Approach

Subfocus Listeners
Managing the Selection Pool
Selection Listeners
Putting Models to Work: A Java File Browser
Writing a Graph Model

Writing a Matrix Model
Model View in Review

Appendix A Java Types, Operators, Literals, and Assignment

Java Types
Integral Primitive Types

Floating Point Primitive Types
The Boolean Primitive Type
Reference Types
Operators

Integer Operators

Integer Numeric Operators

Integer Comparison Operators
The Integer Conditional Operator
Integer Cast Operators
The Integer String Concatenation Operator
Floating Point Operators
Floating Point Numeric Operators

Floating Point Comparison Operators
The Floating Point Conditional Operator
Floating Point Cast Operators
The Floating Point String Concatenation Operator
Boolean Operators
Logical Comparison Operators

The Logical Complement Operator
Logical Operators
The Conditional Logical Operators
The Boolean Conditional Operator
The Boolean String Concatenation Operator
Reference Operators
Reference Field Access Operators

Reference Method Invocation Operators
Reference Cast Operators
The Reference Type Operator
Reference Comparison Operators
The Reference Conditional Operator
Literals
Integer Literals

Floating Point Literals
String Literals
Boolean Literals
Null Constant
Assignment
Simple Assignment Operator

Complex Assignment Operators
Order of Evaluation

Appendix B Java Keywords, Control Structures, and Comments

Overview of Java Keywords

Control Structures

Branching Control Structures

The if Statement

The switch Statement
The try Statement
Looping Control Structures
The for Loop

The while Loop
The do Loop
Using Labeled Statements
Using a Labeled break Statement

Using a Labeled continue Statement
Comments
Single-Line Comments

Multiline Comments
Documentation Comments

Appendix C About the CD-ROM

Installing the Sample Files

The JBuilder Essentials Web Site

Index

Order your copy today from Amazon.com

Last updated 2/6/98
Return to JBuilder Essentials Homepage
JDSI HOME
 

Copyright Jensen Data Systems, Inc. Last modified 2/28/2001.