import javax.swing.JOptionPane; publicclass GUI_DropDownList { publicstaticvoid main(String[] args) { int answer=0; int x=JOptionPane.showConfirmDialog(null,"Do you want to continue...", "OPTION", JOptionPane.YES_NO_OPTION); if (x==0) { answer=dialogAskingTheUserToSelectAString(); if (answer != 0) JOptionPane.showMessageDialog(null, "Message " + answer); else JOptionPane.showMessageDialog(null, "You have cancelled the operation", "ALERT",JOptionPane.ERROR_MESSAGE); } else JOptionPane.showMessageDialog(null, "Bye...", "ALERT",JOptionPane.ERROR_MESSAGE); } staticint dialogAskingTheUserToSelectAString() { Object[] possibleValues = {"Message 1","Message 2","Message 3","Message 4"}; Object selectedValue = JOptionPane.showInputDialog(null,"Choose one", "Input",JOptionPane.INFORMATION_MESSAGE, null,possibleValues, possibleValues[0]); int result=0; if (selectedValue=="Message 1") result = 1; elseif (selectedValue=="Message 2") result = 2; elseif (selectedValue=="Message 3") result = 3; elseif (selectedValue=="Message 4") result = 4; return result; } } After you have successfully run the program, modify it, and add more operations to perform such as the following mathematical operation. Note: The user should select the operation to perform from the 4 mathematical operations.