Help me FATHER

This commit is contained in:
Sage The DM 2025-01-13 20:16:46 +01:00
parent b9fcff496c
commit ee44560575
7 changed files with 7 additions and 15 deletions

View file

@ -16,3 +16,4 @@ The Kingkiller Chronicle
The Kingkiller Chronicle
The Kingkiller Chronicle
The Kingkiller Chronicle
The Wheel of Time

View file

@ -86,17 +86,7 @@ public class CartController {
}
@FXML
private void handleCheckOutButton(ActionEvent event) {
if (cartItems.isEmpty()) {
System.out.println("Cart is empty. Cannot proceed to checkout.");
return;
}
System.out.println("Proceeding to checkout...");
try {
App.setRoot("checkOut");
} catch (IOException e) {
e.printStackTrace();
}
private void handleCheckOutButton(ActionEvent event) throws IOException {
App.setRoot("checkOut");
}
}

View file

@ -94,7 +94,7 @@ public class CheckOutController {
}
@FXML
private void handleSubmit(ActionEvent event) {
private void handleSubmit(ActionEvent event) throws IOException {
System.out.println("Submit button clicked.");
String fullName = fullNameField.getText();
@ -115,6 +115,7 @@ public class CheckOutController {
System.out.println("Form submitted successfully.");
System.out.printf("Billing Info: %s, %s, %s, %s, %s\n", fullName, address, city, zip, country);
System.out.printf("Credit Card Info: %s, %s, %s, CVV: %s\n", cardNumber, cardHolderName, expiryDate, cvv);
App.setRoot("shop");
}
}
}

View file

@ -41,7 +41,7 @@
<Insets />
</BorderPane.margin>
<children>
<Button fx:id="btnCheckOut" mnemonicParsing="false" styleClass="btnCheckOut" text="Check out" GridPane.rowIndex="2" />
<Button fx:id="btnCheckOut" mnemonicParsing="false" onMouseClicked="#handleCheckOutButton" styleClass="btnCheckOut" text="Check out" GridPane.rowIndex="2" />
<Label fx:id="cartTitle" styleClass="cartTitle" text="Your cart" />
<TableView fx:id="cartContent" prefHeight="0.0" prefWidth="364.0" GridPane.rowIndex="1">
<columns>

View file

@ -41,7 +41,7 @@
<Insets />
</BorderPane.margin>
<children>
<Button fx:id="btnCheckOut" mnemonicParsing="false" styleClass="btnCheckOut" text="Check out" GridPane.rowIndex="2" />
<Button fx:id="btnCheckOut" mnemonicParsing="false" onMouseClicked="#handleCheckOutButton" styleClass="btnCheckOut" text="Check out" GridPane.rowIndex="2" />
<Label fx:id="cartTitle" styleClass="cartTitle" text="Your cart" />
<TableView fx:id="cartContent" prefHeight="0.0" prefWidth="364.0" GridPane.rowIndex="1">
<columns>