Wizards are a common user interaction pattern to help collect complex and interdependent pieces of data from a user. Tim Boudreau has been working on an open-source wizard framework for Swing. A recent JavaWorld article provides a detailed tutorial on how to create wizards with Boudreau's Wizard API.
A common pattern of rich-client applications is to simplify the entry of complex data with wizards. A wizard is a series of UI components, presented to the user in a specific order, with components often configured based on data entered on previous components.
Creating such wizards in Swing has for a while been aided by an open-source framework, Swing-Wizard, spearheaded by Tim Boudreau. A recent JavaWorld article, Open source Java projects: The Wizard API, written by Jeff Friesen, focuses on this component, providing a detailed tutorial.
Swing-wizard is an offshoot of a wizard framework for the NetBeans IDE that Bourdreau decided to fork for a more general-purpose API. At the heart of the Swing-wizard component is a map populated with keys and values as a user progresses through the wizard's UI components.
One of the strongest points of the Swing-wizard framework is that it enables the creation of complex workflows: Based on user input, the framework makes it relatively easy to configure the display of subsequent UI components. That's especially useful in situations where prior data determines what future data items need to be collected.
Of the Wizard API, Friesen notes that:
The Wizard API's 17 classes and interfaces are organized into org.netbeans.api.wizard and org.netbeans.spi.wizard packages. The former package's reference types are used to display wizards, which are implemented by the latter package's reference types.
A wizard manages pages, where each page describes one of the wizard's steps and is an instance of the org.netbeans.spi.WizardPage class or a subclass...
Despite some disappointment in not being able to revert to a previous step in a wizard ... I've found Wizard to be a powerful tool that's easy to work with. Most importantly, Wizard takes the pain out of creating Swing-based wizards.