This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Optimal solution for creating multiple dialog's with different fields? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Optimal solution for creating multiple dialog Watch "Optimal solution for creating multiple dialog New topic
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: 2226
    
    8
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.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Optimal solution for creating multiple dialog's with different fields?