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

Fixed visual bug in error message

parent 2ff3cb11
No related branches found
No related tags found
1 merge request!43Merging frontend-testing into master
......@@ -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;
}
......
......@@ -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>
......
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