Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use JOptionPane to get db/port - client side?

 
Ali Hussain
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a custom JDialog for the server side configuration of database path, port, and buttons for starting/stopping the server. But I was wondering if I could take a short cut on the client GUI and just use JOptionPane.showInputDialog like this:

- When standalone mode is selected: Just show a JOptionPane.showInputDialog (with OK and Cancel buttons) and take db path as a string.
- When network client and gui must run: First show a JOptionPane.showInputDialog for the server and then for the port number.

What do you guys think? Has anyone done like this or all of you have custom JDialogs for this?

I am almost finished with my assignment and would like to submit it ASAP. I hope this approach is good enough. Looking forward to hear from you guys.
[ January 10, 2006: Message edited by: Ali Hussain ]
 
Pawel Poltorak
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'd say that 2 dialogs one after another is not a good thing. I've made a custom dialog for configuration.

Aslo, with a little work you can customize JOptionPane to show dialog with 2 text fields.

Best Regards,
Pawel
 
Ali Hussain
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply. Which method in JOptionPane can be used to have two text fields? I could not find any example for this. Do you have a link to a tutorial showing this kind of stuff?

Thanks,
Ali
 
Ali Hussain
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made a custom JDialog for all the options now so just ignore the above messages. I am ready to use my last-minute stamina for that extra mile now
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic