Introduction to the Swing Application Framework
By dananourie on Jan 14, 2008
Introduction: Swing Application Framework in NetBeans IDE 6
The Swing Application Framework is a light framework that simplifies the creation and maintaining of small- to medium-sized Java desktop applications. The framework consists of a Java class library that supports constructs for things such as the following:
\* Remembering state between sessions.
\* Easier managing of actions, including running as background tasks and specifying blocking behavior.
\* Enhanced resource management, including resource injection for bean properties.
The IDE supports the development of applications based on the Swing Application Framework in the following ways:
\* Providing the Java Desktop Application project template, which contains skeleton implementations of the main framework features. This template enables you to choose from the follow two shells:
o Basic Application. Provides a basic frame, some sample menu items, status bar, and mechanisms for managing actions and resources.
o Database Application. Provides all of the features in the Basic Application shell plus all of the features necessary for a simple database application with create, read, update, and delete features. See Building a Java Desktop Database Application for an example of how this shell can be used.
\* Integration of framework features in the IDE's GUI Builder. Swing Application Framework applications can be designed in the IDE like any other Swing application.
\* Generating your application's UI text and other resources in .properties files.
\* Providing a special property editor for actions in which you can associate an action with keyboard accelerators, text, and a tooltip. In addition, you can configure properties for when it is selected or enabled and you can set the action to run asynchronously.
\* Automatically packaging the Swing Application Framework library into your project's dist/lib folder when you build your application in the IDE.
Note: The NetBeans Platform can also be used as an application framework. The main difference between the Swing Application Framework and the NetBeans Platform in this regard is scope. The Swing Application Framework is more lightweight and easier to get started with. The NetBeans Platform is more full-featured and better suited for large and extensible applications. For more information on developing applications based on the NetBeans Platform, see NetBeans Platform Learning Trail.