File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Two Input Dialogs in the Same Window? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Two Input Dialogs in the Same Window?" Watch "Two Input Dialogs in the Same Window?" New topic
Author

Two Input Dialogs in the Same Window?

Sean Magee
Ranch Hand

Joined: Aug 23, 2004
Posts: 69
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

Joined: Aug 02, 2004
Posts: 823
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

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Swing / AWT / SWT / JFace forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Two Input Dialogs in the Same Window?
 
Similar Threads
Displaying error on an Applet
Correct behaviour when launching a new window and getting rid of the first window
Dispose Window & jar
Instantiating a JDialog in constructor - won't execute other lines..
Click button to close popup window