Skip to content
Snippets Groups Projects
Commit c5c1a6f0 authored by Harry Linrui XU's avatar Harry Linrui XU
Browse files

Renamed method + Implemented new buttons in BudgetNewest.fxml

parent 52fc3b33
No related branches found
No related tags found
Loading
......@@ -51,9 +51,8 @@ public interface FinanceController {
void saveDataToFile() throws IOException;
/**
* Switches scenes back to main menu, by loading a new FXML file and setting the scene to this location.
* Switches scenes, by loading a new FXML file and setting the scene to this location.
* @param event A button click on the return to main menu button
* @throws IOException If an error occurs with loading any of the FXML files.
*/
void returnToMainMenu(javafx.event.ActionEvent event) throws IOException;
void switchScene(javafx.event.ActionEvent event);
}
......@@ -581,7 +581,7 @@ public class IncomeExpenseController implements FinanceController {
* @param event A button click on the return to main menu button
*/
@FXML
public void returnToMainMenu(javafx.event.ActionEvent event) {
public void switchScene(javafx.event.ActionEvent event) {
try {
saveDataToFile();
FXMLLoader loader = new FXMLLoader();
......
......@@ -51,7 +51,7 @@
<left>
<Pane prefWidth="175.0" BorderPane.alignment="CENTER">
<children>
<Button fx:id="returnBtn" alignment="CENTER" layoutX="-2.0" layoutY="58.0" mnemonicParsing="false" onAction="#returnToMainMenu" text="Return to Main Menu">
<Button fx:id="returnBtn" alignment="CENTER" layoutX="-2.0" layoutY="58.0" mnemonicParsing="false" onAction="#switchScene" text="Return to Main Menu">
<font>
<Font name="Lucida Console" size="14.0" />
</font>
......@@ -177,6 +177,8 @@
<Insets top="10.0" />
</VBox.margin>
</TableView>
<Button fx:id="backBtn" mnemonicParsing="false" text="back" />
<Button fx:id="continueBtn" mnemonicParsing="false" text="continue" />
</children>
<GridPane.margin>
<Insets top="30.0" />
......
......@@ -85,12 +85,12 @@
</StackPane>
<HBox alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="2">
<children>
<Button fx:id="returnBtn1" mnemonicParsing="false" onAction="#returnToMainMenu" prefWidth="100.0" text="Back">
<Button fx:id="backBtn" mnemonicParsing="false" onAction="#switchScene" prefWidth="100.0" text="Back">
<font>
<Font size="14.0" />
</font>
</Button>
<Button fx:id="returnBtn2" mnemonicParsing="false" onAction="#returnToMainMenu" prefWidth="100.0" text="Continue">
<Button fx:id="continueBtn" mnemonicParsing="false" onAction="#switchScene" prefWidth="100.0" text="Continue">
<font>
<Font size="14.0" />
</font>
......@@ -200,7 +200,7 @@
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button fx:id="returnBtn" alignment="CENTER" mnemonicParsing="false" onAction="#returnToMainMenu" text="Return to Main Menu">
<Button fx:id="returnBtn" alignment="CENTER" mnemonicParsing="false" onAction="#switchScene" text="Return to Main Menu">
<font>
<Font size="14.0" />
</font>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment