• 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

JOptionPane.showInputDialog to accept multiple inputs

 
Greenhorn
Posts: 17
Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Folks,
Befor some one says I din't do my HOMEWORK to search the ranch to see whether this question was already answered, refer this webpage
I am not trying to WAKE THE ZOMBIES either. Its apparent that this question has not been resolved, though the thread was 9 years old!!!

But I need to know whether there is a way to get multiple inputs in showInputDialog of the JOptionPane???



 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure.

Oh, you also want to know how?

The message parameter does not have to be a String. It can be many things, including Components, Icons, Strings and array of any of the above. That means you can do it the following way:

As I said, the message can be Components. That means that you can even build a complex UI hierarchy and display that (as long as the message is not a window (JFrame, JDialog, etc)).
 
Dic scott
Greenhorn
Posts: 17
Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Awesome! thanks dude
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like a GUI-related topic, so I shall move it.
 
Rob Spoor
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dic scott wrote:Awesome! thanks dude


You're welcome
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dic scott wrote: . . this question has not been resolved, though the thread was 9 years old!!! . . .

We make a point of sitting on 1% of all questions for 10 years before we answer them

. . . and we no longer worry about sensible responses to old threads. The don't wake the zombies FAQ has been changed.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Why would you want to make things more complicated by writing things to a file?
 
I'm sure glad that he's gone. Now I can read this tiny ad in peace!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic