The following table outlines the basic process of creating desktop
database applications.

Set up the IDE to Work With Your Database
|
- If necessary,
Register the appropriate driver
for your database with the IDE.
- Connect to the database
from the IDE.
|
|

Create a project and a GUI form
|
Create a new project using
the Java Desktop Application template or the Java Application template.
- If you want to create a simple master/detail application,
use the Java Desktop Application template and the Database Application
shell that the wizard offers. After completing this wizard, you will have
a running CRUD (create, read, update, delete) database application based on a
single database table.
- If your application or database is more complex and you
need to create the design from scratch,
use the Java Desktop Application template and the Basic Application
shell that the wizard offers. Or create a project with
the Java Application template and then
create a GUI form
in the project.
|
|

Add necessary bean and entity classes
|
- Add necessary components to the form,
including custom beans for which you will create bindings
and any necessary converter and validator classes.
- Add entity classes to the project to represent the
database tables with which your application will work.
(Entity classes are special classes that use the
Java Persistence API.)
You can
generate entity classes
or you can write them from scratch.
If you have created an application that is based on the
Database Application shell of the Java Desktop Application template,
an entity class will have been created for you. This entity class
is named according to the database table that it represents.
|
|

Bind component properties
|
- Right-click a component in the Design view of the
Source Editor or in the
Inspector window, and choose a target property from the Bind menu.
- In the
Binding tab of Bind dialog box,
specify the source for the binding.
- In the Advanced tab of Bind dialog box,
specify any other customizations to the binding, if necessary.
For example, some bindings require custom converters, validators,
and code for handling unreadable or non-existent values from the
source.
|
|

Generate and code actions
|
- Generate skeleton action methods for UI components by
right-clicking the component and choosing Set Action to
open the Set Action dialog box.
- In the Action drop-down list, select Create New Action.
- Fill in details for the action, including method name,
name, tool tip text, and accelerator. Optionally,
you can also make the action run as a background task and
do other advanced configuration.
- Click OK to close the dialog box.
- In the Source Editor, type code for the actions.
|
|

Deploy the application
|
|