• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

JOptionPane.showInputDialog to accept multiple inputs

 
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???



 
Sheriff
Posts: 21759
102
Eclipse IDE Spring VI Editor Chrome Java Ubuntu 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
 
Marshal
Posts: 64690
225
  • 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: 21759
102
Eclipse IDE Spring VI Editor Chrome Java Ubuntu 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: 64690
225
  • 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.
 
Campbell Ritchie
Marshal
Posts: 64690
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Why would you want to make things more complicated by writing things to a file?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!