From fbb7cf0e3b21200fb68cc8d3a4bad642f78c748f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carl=20G=C3=BCtzkow?= <cjgutzkow@gmail.com>
Date: Mon, 9 May 2022 22:42:14 +0200
Subject: [PATCH 1/2] feat: better styling for all components

---
 .../ntnu/idatt2001/carljgu/client/App.java    |  4 +-
 .../carljgu/client/BattleController.java      | 30 +++----
 src/main/resources/stylesheet.css             | 88 ++++++++++++++++++-
 src/main/resources/wargames.fxml              | 56 ++++++------
 4 files changed, 132 insertions(+), 46 deletions(-)

diff --git a/src/main/java/edu/ntnu/idatt2001/carljgu/client/App.java b/src/main/java/edu/ntnu/idatt2001/carljgu/client/App.java
index ce10e0f..c85cb27 100644
--- a/src/main/java/edu/ntnu/idatt2001/carljgu/client/App.java
+++ b/src/main/java/edu/ntnu/idatt2001/carljgu/client/App.java
@@ -54,7 +54,9 @@ public class App extends Application {
             stage.show();
         } catch (IOException | IllegalStateException e) {
             new DialogBoxBuilder(ERROR)
-                    .addHeader("Program could not be started. Expand the \"Show details\" button to see full stack trace.")
+                    .addHeader("Program could not be started." +
+                            "Expand the \"Show details\" button to see full stack trace. " +
+                            "Error message: " + e.getMessage())
                     .addListMessage(
                             Arrays.stream(e.getStackTrace())
                                     .map(String::valueOf)
diff --git a/src/main/java/edu/ntnu/idatt2001/carljgu/client/BattleController.java b/src/main/java/edu/ntnu/idatt2001/carljgu/client/BattleController.java
index 8342b6c..dbdef23 100644
--- a/src/main/java/edu/ntnu/idatt2001/carljgu/client/BattleController.java
+++ b/src/main/java/edu/ntnu/idatt2001/carljgu/client/BattleController.java
@@ -20,8 +20,8 @@ import javafx.fxml.Initializable;
 import javafx.scene.control.Button;
 import javafx.scene.control.ChoiceBox;
 import javafx.fxml.FXML;
+import javafx.scene.control.Label;
 import javafx.scene.control.ListView;
-import javafx.scene.text.Text;
 import static javafx.scene.control.Alert.AlertType.*;
 
 /**
@@ -42,24 +42,24 @@ public class BattleController implements Initializable {
     private Button resetArmiesButton, resetAndBattleButton;
 
     @FXML
-    private Text armyOneImportPath, armyOneName, armyOneToString;
+    private Label armyOneImportPath, armyOneName, armyOneToString;
 
     @FXML
     private ListView<Unit> armyOneUnitsListView, armyTwoUnitsListView;
 
     @FXML
-    private Text armyTwoImportPath, armyTwoName, armyTwoToString;
+    private Label armyTwoImportPath, armyTwoName, armyTwoToString;
 
-    private Text[] armyImportPathTexts;
-    private Text[] armyNameTexts;
-    private Text[] armySummaryTexts;
+    private Label[] armyImportPathLabels;
+    private Label[] armyNameLabels;
+    private Label[] armySummaryLabels;
     private ListView[] armyUnitListViews;
 
     @FXML
     private ListView<String> attackList;
 
     @FXML
-    private Text lastSimulation, score;
+    private Label lastSimulation, score;
 
     private Army armyOne, armyTwo;
     private Army[] armies;
@@ -72,7 +72,7 @@ public class BattleController implements Initializable {
     /**
      * Helper method to import an army and
      * display its information in the
-     * given text elements.
+     * given label elements.
      *
      * @param armyNumber - int - the selected army to import.
      *             0 for army one and 1 for army two
@@ -156,7 +156,7 @@ public class BattleController implements Initializable {
     /**
      * Run when clicking on reset armies.
      * Deep copies the armies and creates a new battle.
-     * Also resets the labels and texts.
+     * Also resets the labels.
      *
      * @return result - boolean - true if the reset was a success, false otherwise
      */
@@ -235,7 +235,7 @@ public class BattleController implements Initializable {
     public void displayArmy(int armyNumber, Army army) throws NullPointerException {
         if (army == null) throw new NullPointerException("Army is a a null object");
 
-        armyNameTexts[armyNumber].setText(army.getName());
+        armyNameLabels[armyNumber].setText(army.getName());
 
         String armyRepresentation =
                 "Infantry units: " + army.getInfantryUnits().size() + "\n" +
@@ -243,9 +243,9 @@ public class BattleController implements Initializable {
                 "Cavalry units: " + army.getCavalryUnits().size() + "\n" +
                 "Commander units: " + army.getCommanderUnits().size() + "\n";
 
-        armySummaryTexts[armyNumber].setText(armyRepresentation);
+        armySummaryLabels[armyNumber].setText(armyRepresentation);
 
-        armyImportPathTexts[armyNumber].setText(filePaths[armyNumber]);
+        armyImportPathLabels[armyNumber].setText(filePaths[armyNumber]);
 
         armyUnitListViews[armyNumber].getItems().clear();
         armyUnitListViews[armyNumber].getItems().addAll(army.getAllUnits());
@@ -261,9 +261,9 @@ public class BattleController implements Initializable {
      */
     @Override
     public void initialize(URL url, ResourceBundle resourceBundle) {
-        armyNameTexts = new Text[] {armyOneName, armyTwoName};
-        armyImportPathTexts = new Text[] {armyOneImportPath, armyTwoImportPath};
-        armySummaryTexts = new Text[] {armyOneToString, armyTwoToString};
+        armyNameLabels = new Label[] {armyOneName, armyTwoName};
+        armyImportPathLabels = new Label[] {armyOneImportPath, armyTwoImportPath};
+        armySummaryLabels = new Label[] {armyOneToString, armyTwoToString};
         armyUnitListViews = new ListView[] {armyOneUnitsListView, armyTwoUnitsListView};
         armies = new Army[] {armyOne, armyTwo};
 
diff --git a/src/main/resources/stylesheet.css b/src/main/resources/stylesheet.css
index 381f959..246d474 100644
--- a/src/main/resources/stylesheet.css
+++ b/src/main/resources/stylesheet.css
@@ -1,4 +1,90 @@
-.root{
+.root {
     -fx-font-size: 20px;
     -fx-font-family: "Arial";
+    -fx-base: #424c85;
+    -fx-accent: #c9c9c9;
+
+    -fx-control-inner-background: derive(-fx-base, 35%);
+    -fx-control-inner-background-alt: -fx-control-inner-background ;
+}
+
+.button, .choice-box, .titled-pane {
+    -fx-background-radius: 20px;
+    -fx-border-radius: 10px;
+    -fx-border-width: 4px;
+    -fx-border-color: #000000;
+}
+
+.button {
+    -fx-background-color: #a23645;
+}
+
+.button:hover {
+    -fx-background-color: #d75d88;
+}
+
+.choice-box {
+    -fx-background-color: #71c259;
+}
+
+.label {
+    -fx-text-fill: white;
+}
+
+.button .label {
+    -fx-text-fill: black;
+}
+
+.choice-box:hover {
+    -fx-background-color: #95c786;
+}
+
+.titled-pane > .title {
+    -fx-background-radius: 10px;
+    -fx-border-radius: 10px;
+}
+
+.titled-pane > .title:hover {
+    -fx-color: -fx-base;
+}
+
+#hboxRoot {
+    -fx-background-color: linear-gradient(from 50% 50% to 100% 100%, #304ca8, #6174cc);
+}
+
+.list-view {
+    -fx-background-color: #5686c7;
+}
+
+.list-cell:even {
+    -fx-control-inner-background: derive(-fx-base, 25%);
+    -fx-border-color: grey;
+    -fx-font-family: "Helvetica";
+}
+
+
+.list-cell:odd {
+    -fx-control-inner-background: derive(-fx-base, 15%);
+    -fx-border-color: grey;
+    -fx-font-family: "Helvetica";
+}
+
+.list-cell:empty {
+    -fx-background-color: transparent;
+    -fx-border-color: transparent;
+}
+
+.list-cell {
+    -fx-border-color: transparent;
+    -fx-table-cell-border-color:transparent;
+}
+
+.scroll-bar{
+    -fx-background-color: derive(-fx-base,45%)
+}
+
+.separator *.line {
+    -fx-background-color: #3C3C3C;
+    -fx-border-style: solid;
+    -fx-border-width: 1px;
 }
diff --git a/src/main/resources/wargames.fxml b/src/main/resources/wargames.fxml
index 29e0686..7e328c6 100644
--- a/src/main/resources/wargames.fxml
+++ b/src/main/resources/wargames.fxml
@@ -12,30 +12,29 @@
 <?import javafx.scene.layout.HBox?>
 <?import javafx.scene.layout.VBox?>
 <?import javafx.scene.text.Font?>
-<?import javafx.scene.text.Text?>
 
 <ScrollPane fitToHeight="true" fitToWidth="true" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="720.0" prefWidth="1280.0" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="edu.ntnu.idatt2001.carljgu.client.BattleController">
-   <HBox alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
-      <VBox alignment="CENTER" maxWidth="1.7976931348623157E308" HBox.hgrow="ALWAYS">
+   <HBox fx:id="hboxRoot" alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" >
+      <VBox alignment="CENTER" maxWidth="1.7976931348623157E308" HBox.hgrow="ALWAYS" minWidth="300.0">
          <HBox.margin>
             <Insets bottom="50.0" left="50.0" right="50.0" top="40.0" />
          </HBox.margin>
-         <Text fx:id="armyOneName" strokeType="OUTSIDE" strokeWidth="0.0" text="No army selected" VBox.vgrow="ALWAYS">
+         <Label fx:id="armyOneName" text="No army selected" VBox.vgrow="ALWAYS" textAlignment="CENTER" wrapText="true" maxWidth="300">
             <font>
                <Font name="Arial" size="36.0" />
             </font>
             <VBox.margin>
                <Insets bottom="10.0" top="10.0" />
             </VBox.margin>
-         </Text>
-         <Text fx:id="armyOneToString" strokeType="OUTSIDE" strokeWidth="0.0" text="Import an army" textAlignment="CENTER" wrappingWidth="250" VBox.vgrow="ALWAYS">
+         </Label>
+         <Label fx:id="armyOneToString"  text="Import an army" textAlignment="CENTER"  VBox.vgrow="ALWAYS">
             <font>
                <Font name="Arial" size="20.0" />
             </font>
             <VBox.margin>
                <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
             </VBox.margin>
-         </Text>
+         </Label>
          <HBox alignment="CENTER">
             <VBox.margin>
                <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
@@ -52,14 +51,14 @@
                </HBox.margin>
             </Button>
          </HBox>
-         <Text fx:id="armyOneImportPath" strokeType="OUTSIDE" VBox.vgrow="ALWAYS" strokeWidth="0.0" wrappingWidth="250">
+         <Label fx:id="armyOneImportPath" VBox.vgrow="ALWAYS" wrapText="true" maxWidth="300">
             <font>
                <Font name="Arial" size="18.0" />
             </font>
             <VBox.margin>
                <Insets bottom="10.0" />
             </VBox.margin>
-         </Text>
+         </Label>
          <TitledPane animated="false" collapsible="false" maxHeight="500.0" text="Units" VBox.vgrow="ALWAYS">
             <font>
                <Font name="Arial" size="18.0" />
@@ -79,14 +78,14 @@
                <Insets bottom="40.0" />
             </VBox.margin>
          </Label>
-         <Text strokeType="OUTSIDE" strokeWidth="0.0" text="VS.">
+         <Label text="VS.">
             <font>
                <Font name="Arial" size="36.0" />
             </font>
             <VBox.margin>
                <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
             </VBox.margin>
-         </Text>
+         </Label>
          <HBox alignment="CENTER">
             <Button mnemonicParsing="false" onAction="#resetArmies" text="Reset armies" fx:id="resetArmiesButton">
                <font>
@@ -105,17 +104,16 @@
                </HBox.margin>
             </Button>
          </HBox>
-         <HBox prefHeight="100.0" prefWidth="200.0" />
          <HBox alignment="CENTER">
             <children>
-               <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Choose terrain:">
+               <Label  text="Choose terrain:">
                   <font>
                      <Font name="Arial" size="20.0" />
                   </font>
                   <HBox.margin>
                      <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
                   </HBox.margin>
-               </Text>
+               </Label>
                <ChoiceBox fx:id="terrainChoiceBox" accessibleText="Choose terrain" prefWidth="200.0">
                   <HBox.margin>
                      <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
@@ -123,32 +121,32 @@
                </ChoiceBox>
             </children>
          </HBox>
-         <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Last simulation:">
+         <Label  text="Last simulation:">
             <VBox.margin>
                <Insets bottom="10.0" left="20.0" right="20.0" top="20.0" />
             </VBox.margin>
             <font>
                <Font name="Arial" size="24.0" />
             </font>
-         </Text>
-         <Text fx:id="lastSimulation" strokeType="OUTSIDE" strokeWidth="0.0" text="No simulation run">
+         </Label>
+         <Label fx:id="lastSimulation" text="No simulation run">
             <font>
                <Font name="Arial" size="20.0" />
             </font>
-         </Text>
-         <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Times armies have won:">
+         </Label>
+         <Label  text="Times armies have won:">
             <font>
                <Font name="Arial" size="24.0" />
             </font>
             <VBox.margin>
                <Insets bottom="10.0" left="20.0" right="20.0" top="20.0" />
             </VBox.margin>
-         </Text>
-         <Text fx:id="score" strokeType="OUTSIDE" strokeWidth="0.0" text="0 - 0">
+         </Label>
+         <Label fx:id="score" text="0 - 0">
             <font>
                <Font name="Arial" size="20.0" />
             </font>
-         </Text>
+         </Label>
          <TitledPane animated="false" collapsible="false" maxHeight="1.7976931348623157E308" minHeight="200.0" text="Simulation attack log. Earliest first" VBox.vgrow="ALWAYS">
             <VBox.margin>
                <Insets bottom="10.0" left="10.0" right="10.0" top="20.0" />
@@ -159,26 +157,26 @@
             <ListView fx:id="attackList" />
          </TitledPane>
       </VBox>
-      <VBox alignment="CENTER" HBox.hgrow="ALWAYS">
+      <VBox alignment="CENTER" HBox.hgrow="ALWAYS" minWidth="300.0">
          <HBox.margin>
             <Insets bottom="40.0" left="40.0" right="40.0" top="40.0" />
          </HBox.margin>
-         <Text fx:id="armyTwoName" strokeType="OUTSIDE" strokeWidth="0.0" text="No army selected" VBox.vgrow="ALWAYS">
+         <Label fx:id="armyTwoName"  text="No army selected" VBox.vgrow="ALWAYS" textAlignment="CENTER" wrapText="true" maxWidth="300">
             <font>
                <Font name="Arial" size="36.0" />
             </font>
             <VBox.margin>
                <Insets bottom="10.0" top="10.0" />
             </VBox.margin>
-         </Text>
-         <Text fx:id="armyTwoToString" strokeType="OUTSIDE" strokeWidth="0.0" text="Import an army" textAlignment="CENTER" wrappingWidth="250" VBox.vgrow="ALWAYS">
+         </Label>
+         <Label fx:id="armyTwoToString"  text="Import an army" textAlignment="CENTER"  VBox.vgrow="ALWAYS">
             <font>
                <Font name="Arial" size="20.0" />
             </font>
             <VBox.margin>
                <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
             </VBox.margin>
-         </Text>
+         </Label>
          <HBox alignment="CENTER" maxWidth="1.7976931348623157E308">
             <VBox.margin>
                <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
@@ -195,14 +193,14 @@
                </HBox.margin>
             </Button>
          </HBox>
-         <Text fx:id="armyTwoImportPath" strokeType="OUTSIDE" VBox.vgrow="ALWAYS" strokeWidth="0.0" wrappingWidth="250">
+         <Label fx:id="armyTwoImportPath" VBox.vgrow="ALWAYS" wrapText="true" maxWidth="300">
             <font>
                <Font name="Arial" size="18.0" />
             </font>
             <VBox.margin>
                <Insets bottom="10.0" />
             </VBox.margin>
-         </Text>
+         </Label>
          <TitledPane animated="false" collapsible="false" maxHeight="500.0" text="Units" VBox.vgrow="ALWAYS">
             <font>
                <Font name="Arial" size="18.0" />
-- 
GitLab


From fea5a3ab02fcf5f1ae0216a174f85ac9ae267a57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carl=20G=C3=BCtzkow?= <cjgutzkow@gmail.com>
Date: Sat, 14 May 2022 10:01:18 +0200
Subject: [PATCH 2/2] style: small colorchange and armyname center

---
 src/main/resources/stylesheet.css | 23 +++++--------
 src/main/resources/wargames.fxml  | 55 +++++++++++--------------------
 2 files changed, 28 insertions(+), 50 deletions(-)

diff --git a/src/main/resources/stylesheet.css b/src/main/resources/stylesheet.css
index 246d474..1cad3bf 100644
--- a/src/main/resources/stylesheet.css
+++ b/src/main/resources/stylesheet.css
@@ -10,9 +10,7 @@
 
 .button, .choice-box, .titled-pane {
     -fx-background-radius: 20px;
-    -fx-border-radius: 10px;
-    -fx-border-width: 4px;
-    -fx-border-color: #000000;
+
 }
 
 .button {
@@ -27,6 +25,10 @@
     -fx-background-color: #71c259;
 }
 
+.choice-box:hover {
+    -fx-background-color: #95c786;
+}
+
 .label {
     -fx-text-fill: white;
 }
@@ -35,21 +37,12 @@
     -fx-text-fill: black;
 }
 
-.choice-box:hover {
-    -fx-background-color: #95c786;
-}
-
-.titled-pane > .title {
-    -fx-background-radius: 10px;
-    -fx-border-radius: 10px;
-}
-
 .titled-pane > .title:hover {
     -fx-color: -fx-base;
 }
 
 #hboxRoot {
-    -fx-background-color: linear-gradient(from 50% 50% to 100% 100%, #304ca8, #6174cc);
+    -fx-background-color: linear-gradient(from 25% 25% to 100% 100%, #304ca8, #8e9ee0);
 }
 
 .list-view {
@@ -59,14 +52,14 @@
 .list-cell:even {
     -fx-control-inner-background: derive(-fx-base, 25%);
     -fx-border-color: grey;
-    -fx-font-family: "Helvetica";
+    -fx-font-family: "Arial";
 }
 
 
 .list-cell:odd {
     -fx-control-inner-background: derive(-fx-base, 15%);
     -fx-border-color: grey;
-    -fx-font-family: "Helvetica";
+    -fx-font-family: "Arial";
 }
 
 .list-cell:empty {
diff --git a/src/main/resources/wargames.fxml b/src/main/resources/wargames.fxml
index 7e328c6..19301cf 100644
--- a/src/main/resources/wargames.fxml
+++ b/src/main/resources/wargames.fxml
@@ -1,25 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<?import javafx.geometry.Insets?>
-<?import javafx.scene.control.Button?>
-<?import javafx.scene.control.ChoiceBox?>
-<?import javafx.scene.control.Label?>
-<?import javafx.scene.control.ListView?>
-<?import javafx.scene.control.ScrollPane?>
-<?import javafx.scene.control.TitledPane?>
-<?import javafx.scene.image.Image?>
-<?import javafx.scene.image.ImageView?>
-<?import javafx.scene.layout.HBox?>
-<?import javafx.scene.layout.VBox?>
-<?import javafx.scene.text.Font?>
+<?import javafx.geometry.*?>
+<?import javafx.scene.control.*?>
+<?import javafx.scene.image.*?>
+<?import javafx.scene.layout.*?>
+<?import javafx.scene.text.*?>
 
-<ScrollPane fitToHeight="true" fitToWidth="true" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="720.0" prefWidth="1280.0" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="edu.ntnu.idatt2001.carljgu.client.BattleController">
-   <HBox fx:id="hboxRoot" alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" >
-      <VBox alignment="CENTER" maxWidth="1.7976931348623157E308" HBox.hgrow="ALWAYS" minWidth="300.0">
+<ScrollPane fitToHeight="true" fitToWidth="true" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="720.0" prefWidth="1280.0" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="edu.ntnu.idatt2001.carljgu.client.BattleController">
+   <HBox fx:id="hboxRoot" alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
+      <VBox alignment="CENTER" maxWidth="1.7976931348623157E308" minWidth="300.0" HBox.hgrow="ALWAYS">
          <HBox.margin>
             <Insets bottom="50.0" left="50.0" right="50.0" top="40.0" />
          </HBox.margin>
-         <Label fx:id="armyOneName" text="No army selected" VBox.vgrow="ALWAYS" textAlignment="CENTER" wrapText="true" maxWidth="300">
+         <Label fx:id="armyOneName" alignment="CENTER" maxWidth="300" text="No army selected" textAlignment="CENTER" wrapText="true">
             <font>
                <Font name="Arial" size="36.0" />
             </font>
@@ -27,7 +20,7 @@
                <Insets bottom="10.0" top="10.0" />
             </VBox.margin>
          </Label>
-         <Label fx:id="armyOneToString"  text="Import an army" textAlignment="CENTER"  VBox.vgrow="ALWAYS">
+         <Label fx:id="armyOneToString" text="Import an army" textAlignment="CENTER" VBox.vgrow="ALWAYS">
             <font>
                <Font name="Arial" size="20.0" />
             </font>
@@ -51,7 +44,7 @@
                </HBox.margin>
             </Button>
          </HBox>
-         <Label fx:id="armyOneImportPath" VBox.vgrow="ALWAYS" wrapText="true" maxWidth="300">
+         <Label fx:id="armyOneImportPath" maxWidth="300" wrapText="true" VBox.vgrow="ALWAYS">
             <font>
                <Font name="Arial" size="18.0" />
             </font>
@@ -78,16 +71,8 @@
                <Insets bottom="40.0" />
             </VBox.margin>
          </Label>
-         <Label text="VS.">
-            <font>
-               <Font name="Arial" size="36.0" />
-            </font>
-            <VBox.margin>
-               <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
-            </VBox.margin>
-         </Label>
          <HBox alignment="CENTER">
-            <Button mnemonicParsing="false" onAction="#resetArmies" text="Reset armies" fx:id="resetArmiesButton">
+            <Button fx:id="resetArmiesButton" mnemonicParsing="false" onAction="#resetArmies" text="Reset armies">
                <font>
                   <Font name="Arial" size="20.0" />
                </font>
@@ -95,7 +80,7 @@
                   <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
                </HBox.margin>
             </Button>
-            <Button mnemonicParsing="false" onAction="#runSimulation" text="Reset and battle" fx:id="resetAndBattleButton">
+            <Button fx:id="resetAndBattleButton" mnemonicParsing="false" onAction="#runSimulation" text="Reset and battle">
                <font>
                   <Font name="Arial" size="20.0" />
                </font>
@@ -106,7 +91,7 @@
          </HBox>
          <HBox alignment="CENTER">
             <children>
-               <Label  text="Choose terrain:">
+               <Label text="Choose terrain:">
                   <font>
                      <Font name="Arial" size="20.0" />
                   </font>
@@ -121,7 +106,7 @@
                </ChoiceBox>
             </children>
          </HBox>
-         <Label  text="Last simulation:">
+         <Label text="Last simulation:">
             <VBox.margin>
                <Insets bottom="10.0" left="20.0" right="20.0" top="20.0" />
             </VBox.margin>
@@ -134,7 +119,7 @@
                <Font name="Arial" size="20.0" />
             </font>
          </Label>
-         <Label  text="Times armies have won:">
+         <Label text="Times armies have won:">
             <font>
                <Font name="Arial" size="24.0" />
             </font>
@@ -157,11 +142,11 @@
             <ListView fx:id="attackList" />
          </TitledPane>
       </VBox>
-      <VBox alignment="CENTER" HBox.hgrow="ALWAYS" minWidth="300.0">
+      <VBox alignment="CENTER" minWidth="300.0" HBox.hgrow="ALWAYS">
          <HBox.margin>
             <Insets bottom="40.0" left="40.0" right="40.0" top="40.0" />
          </HBox.margin>
-         <Label fx:id="armyTwoName"  text="No army selected" VBox.vgrow="ALWAYS" textAlignment="CENTER" wrapText="true" maxWidth="300">
+         <Label fx:id="armyTwoName" alignment="CENTER" maxWidth="300" text="No army selected" textAlignment="CENTER" wrapText="true">
             <font>
                <Font name="Arial" size="36.0" />
             </font>
@@ -169,7 +154,7 @@
                <Insets bottom="10.0" top="10.0" />
             </VBox.margin>
          </Label>
-         <Label fx:id="armyTwoToString"  text="Import an army" textAlignment="CENTER"  VBox.vgrow="ALWAYS">
+         <Label fx:id="armyTwoToString" text="Import an army" textAlignment="CENTER" VBox.vgrow="ALWAYS">
             <font>
                <Font name="Arial" size="20.0" />
             </font>
@@ -193,7 +178,7 @@
                </HBox.margin>
             </Button>
          </HBox>
-         <Label fx:id="armyTwoImportPath" VBox.vgrow="ALWAYS" wrapText="true" maxWidth="300">
+         <Label fx:id="armyTwoImportPath" maxWidth="300" wrapText="true" VBox.vgrow="ALWAYS">
             <font>
                <Font name="Arial" size="18.0" />
             </font>
-- 
GitLab