Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. int day = 0;
  2. int year = 0;
  3. int month = 0;
  4.  
  5. input = JOptionPane.showInputDialog("What is Client " + (i+1) + "day of birth?");
  6. day = Integer.parseInt(input);
  7. input = JOptionPane.showInputDialog("What is Client " + (i+1) + "month of birth?");
  8. month = Integer.parseInt(input);
  9. input = JOptionPane.showInputDialog("What is Client " + (i+1) + "year of birth?");
  10. year = Integer.parseInt(input);
  11.  
  12. if (date.calcDate(month, day, year) == false || input.equals(" ")
  13. || input.equals(null) || input.equals(""))
  14. {
  15. do
  16. {
  17. input = JOptionPane.showInputDialog("ERROR! What is Client " + (i+1) + "day of birth?");
  18. day = Integer.parseInt(input);
  19. input = JOptionPane.showInputDialog("ERROR! What is Client " + (i+1) + "month of birth?");
  20. month = Integer.parseInt(input);
  21. input = JOptionPane.showInputDialog("ERROR! What is Client " + (i+1) + "year of birth?");
  22. year = Integer.parseInt(input);
  23. }while(date.calcDate(month, day, year) == false || input.equals(" ")
  24. || input.equals(null) || input.equals(""));
  25. }
  26. else
  27. {
  28. healthApp.setBirthDate(day, month, year);
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement