Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1.             String[] options = new String[] {"Choose A Percentage", "Choose A Number"};
  2.             int response = JOptionPane.showOptionDialog(null, panel, "Label",
  3.             JOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, options[0]);
  4.            
  5.             if (response == 0) {
  6.                 System.out.println("0");
  7.             } else {
  8.                 System.out.println("1");
  9.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement