• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Optimal solution for creating multiple dialog's with different fields?

 
Ranch Hand
Posts: 59
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 3324
32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 59
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

reply
    Bookmark Topic Watch Topic
  • New Topic