mpierse пре 6 година
родитељ
комит
bcd0fb5651

+ 5
- 5
src/main/java/rocks/zipcode/atm/CashMachine.java Прегледај датотеку

@@ -70,11 +70,11 @@ public class CashMachine {
70 70
                 throw new RuntimeException(errorMessage);
71 71
             }
72 72
         } catch (Exception e) {
73
-            Alert alert = new Alert(Alert.AlertType.ERROR);
74
-            alert.setTitle("Overdraw!");
75
-            alert.setHeaderText("Not enough money!");
76
-            alert.setContentText("You do not have enough money in your account to complete this transaction.");
77
-            //System.out.println("Error: " + e.getMessage());
73
+//            Alert alert = new Alert(Alert.AlertType.ERROR);
74
+//            alert.setTitle("Overdraw!");
75
+//            alert.setHeaderText("Not enough money!");
76
+//            alert.setContentText("You do not have enough money in your account to complete this transaction.");
77
+            System.out.println("Error: " + e.getMessage());
78 78
         }
79 79
     }
80 80
 }

+ 4
- 1
src/main/java/rocks/zipcode/atm/CashMachineApp.java Прегледај датотеку

@@ -51,7 +51,10 @@ public class CashMachineApp extends Application {
51 51
         grid.add(userID,0,1);
52 52
         TextField userTextField = new TextField();
53 53
         grid.add(userTextField,1,1);
54
-        btn.setOnAction(e->primaryStage.setScene(scene2));
54
+        btn.setOnAction(e->{
55
+                int id = Integer.parseInt(userTextField.getText());
56
+                cashMachine.login(id);
57
+                primaryStage.setScene(scene2);});
55 58
        return grid;
56 59
     }
57 60
 

+ 2
- 2
src/main/java/rocks/zipcode/atm/bank/Bank.java Прегледај датотеку

@@ -14,11 +14,11 @@ public class Bank {
14 14
 
15 15
     public Bank() {
16 16
         accounts.put(1000, new BasicAccount(new AccountData(
17
-                1000, "Example 1", "example1@gmail.com", 500
17
+                1000, "Doug Funny", "beets@gmail.com", 500
18 18
         )));
19 19
 
20 20
         accounts.put(2000, new PremiumAccount(new AccountData(
21
-                2000, "Example 2", "example2@gmail.com", 200
21
+                2000, "Bugs Bunny", "whatsUpDoc2@gmail.com", 200
22 22
         )));
23 23
 
24 24
         accounts.put(3000, new PremiumAccount(new AccountData(