Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. options = JOptionPane.showInputDialog("How many options would you like?"+
  2. "nnPlease note that you must input a number between 1-10");
  3.  
  4. try{
  5. numberofoptions = Integer.parseInt(options);
  6. }
  7. catch(NumberFormatException e){
  8. JOptionPane.showMessageDialog(null, "Remember to only input a numerical integer");
  9. }
  10.  
  11. JOptionPane.showOptionDialog(null, "Please select a restaurant.", "Restaurant Selector",
  12. JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, Restaurants, Restaurants[0]);
  13.  
  14. exit = JOptionPane.showConfirmDialog(null, "Do you wish to continue?", "Restaurant Selector",
  15. JOptionPane.YES_NO_OPTION);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement