Working with Database Applications

See Also

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

Number One
Set up the IDE to Work With Your Database

  1. If necessary, Register the appropriate driver for your database with the IDE.
  2. Connect to the database from the IDE.

Number Two
Create a project and a GUI form


Number Three
Add necessary bean and entity classes

  1. Add necessary components to the form, including custom beans for which you will create bindings and any necessary converter and validator classes.
  2. 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.

Number Four
Bind component properties

  1. 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.
  2. In the Binding tab of Bind dialog box, specify the source for the binding.
  3. 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.

Number Five
Generate and code actions

  1. Generate skeleton action methods for UI components by right-clicking the component and choosing Set Action to open the Set Action dialog box.
  2. In the Action drop-down list, select Create New Action.
  3. 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.
  4. Click OK to close the dialog box.
  5. In the Source Editor, type code for the actions.

Number Six
Deploy the application

See Also
Binding Data to a Swing Component
About Java GUIs
GUI Builder Tasks: Quick Reference
Designing Java GUIs with the GUI Builder

Legal Notices