Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please answer in Java, thanks Question 12 (a) To find out the opinions of Hong Kong people on an issue, a series of dialogue boxes
Please answer in Java, thanks
Question 12 (a) To find out the opinions of Hong Kong people on an issue, a series of dialogue boxes are designed as follows. (1) The first box is Select an Option ? Do you are the show set up an independent It is produced by the showConfirmdialog(null, String message method of optionPane which returns an integer (the value of which is YES OPTION, NO OPTION or CANCEL OPTION when the "Yes","No" or "Cancel" button is clicked respectively). The message is the string Do you agree the government should set up an independent committee to look into the unrest?". (2) If "Cancel" is clicked, the following message is output and the survey terminates Message 1 Cance Thank you (3) If "Yes" or "No" is clicked, a new box appears: If the person clicks "OK", then whatever entered is stored in a string variable reason (4) If the person clicks "Cancel", the following message appears and the survey ends after the person clicks "OK". Write a Java program segment to produce this series of dialogue boxes. Remember to declare any variable(s) needed
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started