Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Multiple Outputs in a Dialog Box?

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Marshal
Posts: 25818
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Was that the sort of thing you had in mind?
 
Dan Bolens
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Marshal
Posts: 25818
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course.
 
Evildoers! Eat my justice! And this tiny ad's justice too!
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic