| Author |
Optimal solution for creating multiple dialog's with different fields?
|
Kristjan Toots
Ranch Hand
Joined: Jun 03, 2011
Posts: 59
|
|
Hello fellow Ranchers.
I'm working on a personal project where I'm trying to create simple swing/database application. I am certainly not professional developer and I do not even consider myself as a moderate at this point of time. Therefore I turn to community to ask how should I approach this kind of problem.
I imagine alot of dialog boxes jumping around to fetch user input. Would need to present labels, textfields, passwordfields, combobxes, checkboxes etc in various dialog windows.
For example: creating the database firsthand, creating the first admin account, adding users, changing user accounts etc.
Can I somehow use OptionPane to present all those dialog's?
I suppose that creating separate classes which extends JDialog for every dialog I need wouldn't be optimal?
I'm not looking for full solution but rather I would like to know where to look for. Or how should I think about this problem.
Thank you.
|
Please correct my english.
|
 |
Rob Camick
Ranch Hand
Joined: Jun 13, 2009
Posts: 1788
|
|
Can I somehow use OptionPane to present all those dialog's?
You can add any component to a JOptionPane. So you can create a JPanel with your components and then display the option pane using the panel.
|
 |
Kristjan Toots
Ranch Hand
Joined: Jun 03, 2011
Posts: 59
|
|
Thank you, Rob Camick, your responses are always useful.
I have an understanding that JOptionPane is used to create simple quick & easy modal dialog's. I would really like to know why one would choose one over another in this case. Which one is more preferable to use: JOptionPane vs. JDialog
I am asking this because I would like to know how one should do this correctly.
|
 |
 |
|
|
subject: Optimal solution for creating multiple dialog's with different fields?
|
|
|