Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String[] options = new String[] {"Choose A Percentage", "Choose A Number"};
- int response = JOptionPane.showOptionDialog(null, panel, "Label",
- JOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, options[0]);
- if (response == 0) {
- System.out.println("0");
- } else {
- System.out.println("1");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement