ohh god why just why

This commit is contained in:
sageTheDM 2025-01-13 18:34:32 +01:00
parent 9e431b4fbb
commit df8cfc41ed
8 changed files with 20 additions and 28 deletions

View file

@ -71,21 +71,13 @@ public class CartController {
} }
@FXML @FXML
private void handleCartButton(ActionEvent event) { private void handleCartButton() throws IOException {
try { App.setRoot("cart");
App.setRoot("cart");
} catch (IOException e) {
e.printStackTrace();
}
} }
@FXML @FXML
private void handleLoginButton(ActionEvent event) { private void handleLoginButton() throws IOException {
try { App.setRoot("login");
App.setRoot("login");
} catch (IOException e) {
e.printStackTrace();
}
} }
@FXML @FXML

View file

@ -1,5 +1,7 @@
package com.example; package com.example;
import java.io.IOException;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.*; import javafx.scene.control.*;
@ -70,22 +72,19 @@ public class CheckOutController {
} }
@FXML @FXML
private void handleCartButton(ActionEvent event) { private void handleCartButton() throws IOException {
System.out.println("Cart button clicked."); App.setRoot("cart");
// Logic to navigate to the cart page
} }
@FXML @FXML
private void handleLoginButton(ActionEvent event) { private void handleLoginButton() throws IOException {
System.out.println("Login button clicked."); App.setRoot("login");
// Logic to navigate to the login page
} }
@FXML @FXML
private void handlePaymentMethod(ActionEvent event) { private void handlePaymentMethod(ActionEvent event) {
Button clickedButton = (Button) event.getSource(); Button clickedButton = (Button) event.getSource();
System.out.println("Selected payment method: " + clickedButton.getId()); System.out.println("Selected payment method: " + clickedButton.getId());
// Highlight the selected payment method or save the selection
} }
@FXML @FXML

View file

@ -1,5 +1,7 @@
package com.example; package com.example;
import java.io.IOException;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.control.Label; import javafx.scene.control.Label;
@ -31,9 +33,8 @@ public class LoginController {
private Label footerCopyText; private Label footerCopyText;
@FXML @FXML
private void handleCartButtonClick(MouseEvent event) { private void handleCartButton() throws IOException {
System.out.println("Cart button clicked."); App.setRoot("cart");
// Logic to navigate to the cart page
} }
@FXML @FXML

View file

@ -1,5 +1,7 @@
package com.example; package com.example;
import java.io.IOException;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.control.Label; import javafx.scene.control.Label;
@ -45,15 +47,13 @@ public class RegisterController {
private Label footerCopyText; private Label footerCopyText;
@FXML @FXML
private void handleCartButtonClick(MouseEvent event) { private void handleCartButton() throws IOException {
System.out.println("Cart button clicked."); App.setRoot("cart");
// Logic to navigate to the cart page
} }
@FXML @FXML
private void handleLoginButtonClick(MouseEvent event) { private void handleLoginButton() throws IOException {
System.out.println("Login button clicked."); App.setRoot("login");
// Logic to navigate to the login page
} }
@FXML @FXML