Reputation: 51
I want to create an internal wizard in my Java GUI application such that the clicking of a menu item results in popping up of a wizard that guides the user through a series of steps. I have done lot of research and couldn't find anything with decent enough documentation. Can someone help me out please? Has someone worked on creating a wizard that pops up INSIDE a GUI application?
Thanks in advance!
Upvotes: 2
Views: 4332
Reputation: 11016
You can use cjwizard. It can be embedded inside a JDialog as it is based in JPanel.
And you can see how to use it in https://github.com/cjwizard/cjwizard/blob/master/docs/quickstart.md for example:
// create the WizardContainer:
final PageFactory pageFactory = /* create a PageFactory, see the link */;
final WizardContainer wizard = new WizardContainer(pageFactory)
// stick the WizardContainer into a dialog:
final JDialog dialog = new JDialog();
dialog.getContentPane().add(wizard);
dialog.pack();
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
Disclaimer: I'm part of the development team.
Upvotes: 5
Reputation: 32391
If there are no third-party libraries to satisfy the requirements you have then you can just write your own approach. A set of panels, each one having Previous, Next buttons and some of them Finish. The current panel just needs to know which are the previous and the next panels.
Upvotes: 3