Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. import javax.swing.JFrame;
  2. import javax.swing.JOptionPane;
  3. public class RunCarWach
  4.  
  5. {
  6.  
  7. public static void main(String[] argv) throws Exception
  8. {
  9. JFrame frame = new JFrame();
  10. String message = "Welcom customer insert your card ";
  11. JOptionPane.showMessageDialog(frame, message);
  12. String name1 = JOptionPane.showInputDialog(null, "What type of wash do you want: \n"
  13.  
  14. + "\n"
  15. + " type 1 if you want Foamy wash "
  16. + "\n"
  17. + " type 2 if you want TunnelWash wash"
  18. + "\n"
  19. + " type 3 if you want WaxWash wash"
  20. + "\n"
  21. + " type 4 if you want VipWash wash"
  22. );
  23.  
  24. System.out.println("you choose number: " +name1);
  25. if (name1.equals("1")){
  26. JOptionPane.showConfirmDialog(null, "you choose nr 1 Foamy wash ");
  27. }
  28. if (name1.equals("2")){
  29. JOptionPane.showConfirmDialog(null, "you choose nr 2 TunnelWash wash ");
  30. }
  31. if (name1.equals("3")){
  32. JOptionPane.showConfirmDialog(null, "you choose nr 3 WaxWash wash ");
  33. }
  34. if (name1.equals("4")){
  35. JOptionPane.showConfirmDialog(null, "you choose nr 4 VipWash wash ");
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement