Help me dear lord
This commit is contained in:
		
							parent
							
								
									55b62b7b3d
								
							
						
					
					
						commit
						15468735cd
					
				
					 6 changed files with 67 additions and 50 deletions
				
			
		|  | @ -28,7 +28,7 @@ public class App extends Application { | |||
|         // Set the stage properties | ||||
|         stage.setScene(scene); | ||||
|         stage.setTitle("Fantasy Brigade Bookshop"); | ||||
|         stage.setFullScreen(true); // Make the application fullscreen | ||||
|         stage.setFullScreen(true); | ||||
|         stage.show(); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -8,6 +8,8 @@ import javafx.scene.control.TableColumn; | |||
| import javafx.scene.control.TableView; | ||||
| import javafx.scene.control.cell.PropertyValueFactory; | ||||
| 
 | ||||
| import java.io.IOException; | ||||
| 
 | ||||
| public class CartController { | ||||
| 
 | ||||
|     @FXML | ||||
|  | @ -57,65 +59,33 @@ public class CartController { | |||
|     @FXML | ||||
|     private void handleCartButton(ActionEvent event) { | ||||
|         System.out.println("Cart button clicked!"); | ||||
|         // Add logic to navigate to the cart view or perform related actions | ||||
|         try { | ||||
|             // Navigate to the cart page (using the setRoot method from App) | ||||
|             App.setRoot("cart"); | ||||
|         } catch (IOException e) { | ||||
|             e.printStackTrace(); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     @FXML | ||||
|     private void handleLoginButton(ActionEvent event) { | ||||
|         System.out.println("Login button clicked!"); | ||||
|         // Add logic to open the login page or dialog | ||||
|         try { | ||||
|             // Navigate to the login page | ||||
|             App.setRoot("login"); | ||||
|         } catch (IOException e) { | ||||
|             e.printStackTrace(); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     @FXML | ||||
|     private void handleCheckOutButton(ActionEvent event) { | ||||
|         System.out.println("Checkout button clicked!"); | ||||
|         // Add logic to proceed to checkout | ||||
|     } | ||||
| 
 | ||||
|     // Inner class to represent items in the cart | ||||
|     public static class Item { | ||||
|         private String name; | ||||
|         private String description; | ||||
|         private int quantity; | ||||
|         private double price; | ||||
| 
 | ||||
|         public Item(String name, String description, int quantity, double price) { | ||||
|             this.name = name; | ||||
|             this.description = description; | ||||
|             this.quantity = quantity; | ||||
|             this.price = price; | ||||
|         try { | ||||
|             // Navigate to the checkout page | ||||
|             App.setRoot("checkout"); | ||||
|         } catch (IOException e) { | ||||
|             e.printStackTrace(); | ||||
|         } | ||||
| 
 | ||||
|         public String getName() { | ||||
|             return name; | ||||
|         } | ||||
| 
 | ||||
|         public void setName(String name) { | ||||
|             this.name = name; | ||||
|         } | ||||
| 
 | ||||
|         public String getDescription() { | ||||
|             return description; | ||||
|         } | ||||
| 
 | ||||
|         public void setDescription(String description) { | ||||
|             this.description = description; | ||||
|         } | ||||
| 
 | ||||
|         public int getQuantity() { | ||||
|             return quantity; | ||||
|         } | ||||
| 
 | ||||
|         public void setQuantity(int quantity) { | ||||
|             this.quantity = quantity; | ||||
|         } | ||||
| 
 | ||||
|         public double getPrice() { | ||||
|             return price; | ||||
|         } | ||||
| 
 | ||||
|         public void setPrice(double price) { | ||||
|             this.price = price; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -0,0 +1,47 @@ | |||
| package com.example; | ||||
| 
 | ||||
| public static class Item { | ||||
|     private String name; | ||||
|     private String description; | ||||
|     private int quantity; | ||||
|     private double price; | ||||
| 
 | ||||
|     public Item(String name, String description, int quantity, double price) { | ||||
|         this.name = name; | ||||
|         this.description = description; | ||||
|         this.quantity = quantity; | ||||
|         this.price = price; | ||||
|     } | ||||
| 
 | ||||
|     public String getName() { | ||||
|         return name; | ||||
|     } | ||||
| 
 | ||||
|     public void setName(String name) { | ||||
|         this.name = name; | ||||
|     } | ||||
| 
 | ||||
|     public String getDescription() { | ||||
|         return description; | ||||
|     } | ||||
| 
 | ||||
|     public void setDescription(String description) { | ||||
|         this.description = description; | ||||
|     } | ||||
| 
 | ||||
|     public int getQuantity() { | ||||
|         return quantity; | ||||
|     } | ||||
| 
 | ||||
|     public void setQuantity(int quantity) { | ||||
|         this.quantity = quantity; | ||||
|     } | ||||
| 
 | ||||
|     public double getPrice() { | ||||
|         return price; | ||||
|     } | ||||
| 
 | ||||
|     public void setPrice(double price) { | ||||
|         this.price = price; | ||||
|     } | ||||
| } | ||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue