diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2023-05-18 08:51:31 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2023-05-18 08:51:31 -0400 |
commit | fe9794bdc8270b43ed5ae847d65ea2a2eecd4a79 (patch) | |
tree | 6417e66b2de9f67647ae9e0d6b853858da466275 /src/gui/Leaderboard.java | |
parent | bbad14a33c614ac3480c599dd72a06e14a86295c (diff) | |
download | NPEhero-fe9794bdc8270b43ed5ae847d65ea2a2eecd4a79.tar.gz NPEhero-fe9794bdc8270b43ed5ae847d65ea2a2eecd4a79.tar.bz2 NPEhero-fe9794bdc8270b43ed5ae847d65ea2a2eecd4a79.zip |
fix resizing and the bottom being too long
Diffstat (limited to '')
-rw-r--r-- | src/gui/Leaderboard.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/Leaderboard.java b/src/gui/Leaderboard.java index 9580a5f..b91fa7c 100644 --- a/src/gui/Leaderboard.java +++ b/src/gui/Leaderboard.java @@ -17,8 +17,8 @@ public class Leaderboard extends Pane ListView<String> scores = new ListView<String>(); ObservableList<String> scoreList= FXCollections.observableArrayList ("Test Score 1", "Test Score 2", "Test Score 3", "Test Score 4"); scores.setItems(scoreList); - scores.minWidthProperty().bind(super.widthProperty().multiply(0.25)); - scores.minHeightProperty().bind(super.heightProperty().multiply(0.75)); + scores.prefWidthProperty().bind(super.prefWidthProperty().multiply(0.25)); + scores.prefHeightProperty().bind(super.prefHeightProperty().multiply(0.75)); Button exit = new Button(); exit.setText("Exit"); @@ -30,8 +30,8 @@ public class Leaderboard extends Pane centerBox.getChildren().addAll(scores,exit); HBox rootBox = new HBox(); - rootBox.minWidthProperty().bind(super.widthProperty()); - rootBox.minHeightProperty().bind(super.heightProperty()); + rootBox.prefWidthProperty().bind(super.prefWidthProperty()); + rootBox.prefHeightProperty().bind(super.prefHeightProperty()); rootBox.getChildren().add(centerBox); rootBox.setAlignment(Pos.CENTER); |