diff --git a/src/main/java/no/ntnu/idatt1002/demo/controller/CreateBudgetController.java b/src/main/java/no/ntnu/idatt1002/demo/controller/CreateBudgetController.java index ebe6bace15a4147222533d552758d73f98ee1949..e061094c62103ef3d9fb5ee147467c08e4987347 100644 --- a/src/main/java/no/ntnu/idatt1002/demo/controller/CreateBudgetController.java +++ b/src/main/java/no/ntnu/idatt1002/demo/controller/CreateBudgetController.java @@ -62,7 +62,7 @@ public class CreateBudgetController { if(!createNewFiles(budgetName)) { updateCurrentFile("", ""); - errorMsg.setText("A budget of the same \nname already exists"); + errorMsg.setText("A budget of the same name already exists"); errorMsg.setOpacity(1); return; } diff --git a/src/main/resources/view/CreateBudget.fxml b/src/main/resources/view/CreateBudget.fxml index adfe27dcf344de69f0c58a14fc285e74d691a904..6d9dafaa20e5693e3e1c471c8b69d3f9f6ace3b1 100644 --- a/src/main/resources/view/CreateBudget.fxml +++ b/src/main/resources/view/CreateBudget.fxml @@ -11,9 +11,10 @@ <?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.VBox?> +<?import javafx.scene.text.Font?> <?import javafx.scene.text.Text?> -<DialogPane prefHeight="225.0" prefWidth="240.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.CreateBudgetController"> +<DialogPane prefHeight="113.0" prefWidth="327.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.CreateBudgetController"> <content> <VBox> <children> @@ -32,7 +33,7 @@ <Label text="Name: " GridPane.rowIndex="1" /> </children> </GridPane> - <Label fx:id="errorMsg" alignment="CENTER_RIGHT" opacity="0.0" text="Please fill in the name" textFill="RED" /> + <Label fx:id="errorMsg" alignment="CENTER_RIGHT" opacity="0.0" prefHeight="315.0" prefWidth="315.0" text="Please fill in the name field" textAlignment="CENTER" textFill="RED" /> <HBox alignment="CENTER_RIGHT" prefHeight="100.0" prefWidth="200.0" spacing="5.0"> <children> <Button fx:id="cancelBtn" mnemonicParsing="false" onAction="#pressCancelBtn" prefWidth="70.0" text="Cancel" /> @@ -48,7 +49,10 @@ <header> <Pane prefHeight="40.0"> <children> - <Text layoutX="12.0" layoutY="25.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Please type the name of your budget" /> + <Text layoutX="12.0" layoutY="25.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Please type the name of your budget"> + <font> + <Font name="Lucida Console" size="14.0" /> + </font></Text> </children> </Pane> </header>