Working With the Swing Application Framework

See Also

The following table outlines the basic process of working with the Swing Application Framework in the IDE.

Number One
Create a Java Desktop Application project

  1. Choose File > New Project.
  2. In the New Project wizard, select the Java category and select the Java Desktop Application template. Click Next.
  3. Choose an application shell.

    Both the Basic Application and Database Application shells enable you to take advantage of all of the framework features.

  4. Complete the wizard.

Number Two
Add components

  1. Create other any other forms needed by the application.
  2. Add necessary components to your forms, including custom beans for which you will create bindings.

Number Three
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 Four
Edit application properties

  1. Right-click the project's node and choose Properties.
  2. Click the Application node to edit properties such as the name that appears in the application's title bar.
  3. Click the Desktop App node to edit further properties, such as Application ID and Look and Feel
See Also
About the Swing Application Framework
About Actions in the Swing Application Framework
About Resources in the Swing Application Framework
About Java GUIs
GUI Builder Tasks: Quick Reference
Designing Java GUIs with the GUI Builder

Legal Notices