• Post Reply Bookmark Topic Watch Topic
  • New Topic

JOptionPane.showInputDialog to accept multiple inputs

 
Dic scott
Greenhorn
Posts: 17
Java Ubuntu
  • Mark post as helpful
  • send pies
  • 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???



 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Awesome! thanks dude
 
Campbell Ritchie
Marshal
Posts: 52581
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like a GUI-related topic, so I shall move it.
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dic scott wrote:Awesome! thanks dude

You're welcome
 
Campbell Ritchie
Marshal
Posts: 52581
119
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!