Primary FXML
Primary FXML
fxml
src/main/resources/tham/seven/primary.fxml
localhost:62762/66df8eaf-9441-4892-9764-552ad28f836c/ 1/3
5/7/25, 9:43 PM primary.fxml
34
35 <!-- Pie Chart -->
36 <Label text=" 📊
Spending Breakdown" style="-fx-font-size: 20px; -fx-font-weight: bold;" />
37 <PieChart fx:id="pieChart" prefWidth="400" prefHeight="400" style="-fx-background-color: transparent;" />
38 </VBox>
39
40 <!-- Right side -->
41 <VBox alignment="TOP_CENTER" spacing="20" prefWidth="480" style="-fx-background-color: #ffffff; -fx-background-
radius: 12; -fx-padding: 25; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.08), 10, 0, 0, 5);">
42 <Label text=" 📘
Expenses Tracker" style="-fx-font-size: 22px; -fx-font-weight: bold;" />
43
44 <GridPane hgap="15" vgap="15" style="-fx-alignment: CENTER;">
45 <Label text="Date:" GridPane.columnIndex="0" GridPane.rowIndex="0" />
46 <TextField fx:id="dateField" prefWidth="220" GridPane.columnIndex="1" GridPane.rowIndex="0" style="-fx-
background-radius: 8;" />
47
48 <Label text="Amount:" GridPane.columnIndex="0" GridPane.rowIndex="1" />
49 <TextField fx:id="amountField" prefWidth="220" GridPane.columnIndex="1" GridPane.rowIndex="1" style="-
fx-background-radius: 8;" />
50
51 <Label text="Category:" GridPane.columnIndex="0" GridPane.rowIndex="2" />
52 <TextField fx:id="categoryField" prefWidth="220" GridPane.columnIndex="1" GridPane.rowIndex="2" style="-
fx-background-radius: 8;" />
53
54 <Label text="Description:" GridPane.columnIndex="0" GridPane.rowIndex="3" />
55 <TextField fx:id="descriptionField" prefWidth="220" GridPane.columnIndex="1" GridPane.rowIndex="3"
style="-fx-background-radius: 8;" />
56
57 <Label text="In Budget:" GridPane.columnIndex="0" GridPane.rowIndex="4" />
58 <CheckBox fx:id="inBudgetCheckBox" GridPane.columnIndex="1" GridPane.rowIndex="4" />
59
60 <Button text=" 🗓️
New Month" onAction="#startNewMonth" style="-fx-background-radius: 8; -fx-background-
color: #ff9800; -fx-text-fill: white;" />
61
62
63 <columnConstraints>
64 <ColumnConstraints />
65 <ColumnConstraints />
66 </columnConstraints>
localhost:62762/66df8eaf-9441-4892-9764-552ad28f836c/ 2/3
5/7/25, 9:43 PM primary.fxml
67
68 </GridPane>
69
70 <!-- Action Buttons -->
71 <HBox alignment="CENTER" spacing="15">
72 <Button fx:id="addButton" text=" ➕
Add" onAction="#handleAddTransaction
" style="-fx-background-radius:
8; -fx-background-color: #4caf50; -fx-text-fill: white;" />
73 <Button fx:id="updateButton" text=" ✏️
Update" onAction="#updateTransaction" style="-fx-background-
radius: 8; -fx-background-color: #2196f3; -fx-text-fill: white;" />
74 <Button fx:id="deleteButton" text=" 🗑️
Delete" onAction="#deleteTransaction" style="-fx-background-
radius: 8; -fx-background-color: #f44336; -fx-text-fill: white;" />
75 </HBox>
76
77 <!-- Navigation Buttons -->
78 <HBox alignment="CENTER" spacing="10">
79 <Button fx:id="firstButton" onAction="#firstTransaction" prefWidth="40" text="⏮" style="-fx-background-
radius: 5;" />
80 ⏪
<Button fx:id="prev2Button" onAction="#prevTransaction" prefWidth="40" text=" " style="-fx-background-
radius: 5;" />
81 <Button fx:id="prevButton" onAction="#prevTransaction" prefWidth="40" text="◀" style="-fx-background-
radius: 5;" />
82 <Button fx:id="nextButton" onAction="#nextTransaction" prefWidth="40" text="▶" style="-fx-background-
radius: 5;" />
83 ⏩
<Button fx:id="next2Button" onAction="#nextTransaction" prefWidth="40" text=" " style="-fx-background-
radius: 5;" />
84 <Button fx:id="lastButton" onAction="#lastTransaction" prefWidth="40" text="⏭" style="-fx-background-
radius: 5;" />
85 </HBox>
86 </VBox>
87 </HBox>
88
localhost:62762/66df8eaf-9441-4892-9764-552ad28f836c/ 3/3