diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CartController.java b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CartController.java index 2a2bd49..1aceb3a 100644 --- a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CartController.java +++ b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CartController.java @@ -71,21 +71,13 @@ public class CartController { } @FXML - private void handleCartButton(ActionEvent event) { - try { - App.setRoot("cart"); - } catch (IOException e) { - e.printStackTrace(); - } + private void handleCartButton() throws IOException { + App.setRoot("cart"); } @FXML - private void handleLoginButton(ActionEvent event) { - try { - App.setRoot("login"); - } catch (IOException e) { - e.printStackTrace(); - } + private void handleLoginButton() throws IOException { + App.setRoot("login"); } @FXML diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CheckOutController.java b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CheckOutController.java index 31c50b4..15957a5 100644 --- a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CheckOutController.java +++ b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CheckOutController.java @@ -1,5 +1,7 @@ package com.example; +import java.io.IOException; + import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.*; @@ -70,22 +72,19 @@ public class CheckOutController { } @FXML - private void handleCartButton(ActionEvent event) { - System.out.println("Cart button clicked."); - // Logic to navigate to the cart page + private void handleCartButton() throws IOException { + App.setRoot("cart"); } @FXML - private void handleLoginButton(ActionEvent event) { - System.out.println("Login button clicked."); - // Logic to navigate to the login page + private void handleLoginButton() throws IOException { + App.setRoot("login"); } @FXML private void handlePaymentMethod(ActionEvent event) { Button clickedButton = (Button) event.getSource(); System.out.println("Selected payment method: " + clickedButton.getId()); - // Highlight the selected payment method or save the selection } @FXML diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/LoginController.java b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/LoginController.java index f37b480..241c026 100644 --- a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/LoginController.java +++ b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/LoginController.java @@ -1,5 +1,7 @@ package com.example; +import java.io.IOException; + import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.Label; @@ -31,9 +33,8 @@ public class LoginController { private Label footerCopyText; @FXML - private void handleCartButtonClick(MouseEvent event) { - System.out.println("Cart button clicked."); - // Logic to navigate to the cart page + private void handleCartButton() throws IOException { + App.setRoot("cart"); } @FXML diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/RegisterController.java b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/RegisterController.java index dbfe841..b34a571 100644 --- a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/RegisterController.java +++ b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/RegisterController.java @@ -1,5 +1,7 @@ package com.example; +import java.io.IOException; + import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.Label; @@ -45,15 +47,13 @@ public class RegisterController { private Label footerCopyText; @FXML - private void handleCartButtonClick(MouseEvent event) { - System.out.println("Cart button clicked."); - // Logic to navigate to the cart page + private void handleCartButton() throws IOException { + App.setRoot("cart"); } @FXML - private void handleLoginButtonClick(MouseEvent event) { - System.out.println("Login button clicked."); - // Logic to navigate to the login page + private void handleLoginButton() throws IOException { + App.setRoot("login"); } @FXML diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CartController.class b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CartController.class index 955fa45..69a1b6a 100644 Binary files a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CartController.class and b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CartController.class differ diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CheckOutController.class b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CheckOutController.class index 523b9b9..e3d64ed 100644 Binary files a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CheckOutController.class and b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CheckOutController.class differ diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/LoginController.class b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/LoginController.class index f55da48..307bf73 100644 Binary files a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/LoginController.class and b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/LoginController.class differ diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/RegisterController.class b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/RegisterController.class index b0dc5db..3438549 100644 Binary files a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/RegisterController.class and b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/RegisterController.class differ