Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two Input Dialogs in the Same Window?

 
Sean Magee
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
using package javax.swing, how could I get a total of 3 input dialogs in the same window? For example, if I need to ask for feet and inches so that the input dialogs are along the same line, and i need to ask a weight value, so I would need 3 input dialogs altogether. I will be using JOption.pane.InputDialog of course. could someone help?
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about something like this (almost straight out of a book):

You really need to spend some time working through a Swing tutorial. Sun's Swing Fundamentals comes in two parts: Part I and Part II You may also find the AWT Tutorial useful as a foundation. After a quick scan I'm not sure that JOptionPane is covered; perhaps you should Google. [Edit: Sun's Swing Tutorial is more complete and up-to-date.]

Jules

[JK: Edited to add up-to-date Swing Tutorial link]
[ September 06, 2004: Message edited by: Julian Kennedy ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / AWT / SWT / JFace forum...
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want an input box with multiple inputs?

If so, here's something to play around with (it's really rough - demo purposes only)



Did I mention this was rough?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic