There's a complete Wizard framework that is part of the NetBeans Platform. It really lets you focus on your domain logic, without needing to think too much about the logic needed for the wizard to work. So, in the above case, I used the Wizard wizard in NetBeans IDE to create a wizard skeleton, added my UI components in the Matisse GUI Builder, and then specified the values that needed to be stored, using the placeholders in the generated code to do so. Everything else, such as the buttons you see above, come for free with the Wizard framework, so that you don't need to create them yourself. You can also add validation logic to the skeleton created by the Wizard wizard, to prevent the user from completing the wizard if the values have not been set or have not been set correctly.
Then the NbPreferences API is used to store the values set above, with a PreferenceChangeListener in the PuzzleScene class, causing the scene to be recreated when the user changes the values in the Puzzle Wizard, since doing so causes the preferences to change:
Everything mentioned above is documented and described in the NetBeans Wizard Module Tutorial.