How would I do this in Java? (checkboxes/options)?
I am trying to allow a user to select any number of 5 checkboxes before hitting an OK button to continue on with the program, which will behave accordingly depending on which ones were selected.
For a simple example, let's say I make a short program where I ask a user to select checkboxes, and I will display a message with certain strings out of a set of 5, but only ones corresponding to the selected boxes will be shown. Can anyone tell me how I can do this?
(i.e., let's say I have 5 strings, "Hello", "Pumpkin", "Spice" "42", "Goodbye". I would display the string "Pumpkin" in a message only if the second checkbox was previously selected, and "42" only if the fourth one was. These checkboxes would be selected previously by a user, and they would have like an "OK" button or something to display the message when they are ready. I need some way that a user can choose more than one option in a choice while waiting to continue with a program until the user is ready.)