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 Multiple Outputs in a Dialog Box? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Multiple Outputs in a Dialog Box?" Watch "Multiple Outputs in a Dialog Box?" New topic
Author

Multiple Outputs in a Dialog Box?

Dan Bolens
Greenhorn

Joined: Sep 10, 2012
Posts: 25
One last question and then this project is finished! I need to finally output all my information gathered from this pizza program I'm making into a Dialog Box, but I have two dilemmas. The output is based off of 4 possible "if" statements currently (that just outputs in the console), and I don't know how to grabinformation from two out of the four possible "if" statements and stick it into into one Dialog Box. I've seen things like

where you just fit everything into one big command, but that doesn't solve my "if" statement problem (unless I program in 4 different possible output boxes for each scenario). The Dialog box would need to show a certain output based on what the user has entered previously (for instance, if the user entered "c" for circle instead of "r" for rectangle, the dialog box needs to display "diameter" instead of "dimensions").

Any tips?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18126
    
    8



Was that the sort of thing you had in mind?
Dan Bolens
Greenhorn

Joined: Sep 10, 2012
Posts: 25
Paul Clapham wrote:

Was that the sort of thing you had in mind?


Yes, it was. Would I be able to print out two things in OptionPane like that? For instance

if I have a bunch of output from a second if statement that I need to include?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18126
    
    8

Of course.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple Outputs in a Dialog Box?
 
Similar Threads
Correct behaviour when launching a new window and getting rid of the first window
actionforward
Logic problem
Conversion table
showInputDialog