Menu

Question 12 Find Opinions Hong Kong People Issue Series Dialogue Boxes Designed Follows 1 Q43785521

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.

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 Show transcribed image text 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

Expert Answer


Answer to Question 12 (a) To find out the opinions of Hong Kong people on an issue, a series of dialogue boxes are designed as fol…

OR