Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Two Input Dialogs in the Same Window?

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to the Swing / AWT / SWT / JFace forum...
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
He does not suffer fools gladly. But this tiny ad does:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic