aboutsummaryrefslogtreecommitdiff
path: root/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Window.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/dk.biks.bachelorizer/dk/biks/bachelorizer/Window.java')
-rw-r--r--src/dk.biks.bachelorizer/dk/biks/bachelorizer/Window.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Window.java b/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Window.java
index df29ced..d75e05c 100644
--- a/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Window.java
+++ b/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Window.java
@@ -24,8 +24,17 @@ public final class Window extends Application {
public Window() {
}
+ /// window width
+ private static final int WINDOW_WIDTH = 500;
+
+ /// window height
+ private static final int WINDOW_HEIGHT = 500;
+
+ /// box height
+ private static final int BOX_HEIGHT = 10;
+
/// Label styling
- public static String LABEL_STYLE =
+ private static String LABEL_STYLE =
"-fx-font-weight: bold; -fx-font-size: 20;";
/// Application model
@@ -71,14 +80,14 @@ public final class Window extends Application {
delAll.setOnAction(e -> control.delAll());
// add buttons
- VBox root = new VBox(10,
+ VBox root = new VBox(BOX_HEIGHT,
ourHBox("Student", nameEntry),
ourHBox("Add activity", activityEntry),
- new HBox(10, delOne, delAll),
+ new HBox(BOX_HEIGHT, delOne, delAll),
area);
// compose stage
- Scene scene = new Scene(root, 500, 500);
+ Scene scene = new Scene(root, WINDOW_WIDTH, WINDOW_HEIGHT);
stage.setTitle("JavaFX Demo");
stage.setScene(scene);
stage.show();
@@ -112,6 +121,6 @@ public final class Window extends Application {
Label label = new Label(s + ":");
label.setStyle(LABEL_STYLE);
- return new HBox(10, label, f);
+ return new HBox(BOX_HEIGHT, label, f);
}
}