diff --git a/src/main/java/seedu/address/ui/MainWindow.java b/src/main/java/seedu/address/ui/MainWindow.java
index e9707514f1a..d13f8551666 100644
--- a/src/main/java/seedu/address/ui/MainWindow.java
+++ b/src/main/java/seedu/address/ui/MainWindow.java
@@ -206,7 +206,10 @@ private void toggleTabs() {
VBox.setVgrow(loanList, Priority.ALWAYS);
loanListPanelPlaceholder.getChildren().add(loanListPanel.getRoot());
VBox.setVgrow(analytics, Priority.NEVER);
- personListPanelPlaceholder.setMaxHeight(240);
+ personListPanelPlaceholder.setMaxHeight(105);
+ personListPanelPlaceholder.setMinHeight(105);
+ VBox.setVgrow(personList, Priority.NEVER);
+
System.out.println("Both tabs are active");
} else if (isPersonTab.getValue()) {
// Default to person list panel
@@ -223,12 +226,14 @@ private void toggleTabs() {
VBox.setVgrow(personList, Priority.NEVER);
VBox.setVgrow(analytics, Priority.NEVER);
loanListPanelPlaceholder.getChildren().add(loanListPanel.getRoot());
+ personListPanelPlaceholder.setMinHeight(0);
System.out.println("Only loans tab is active");
} else {
clearAllPlaceholders();
VBox.setVgrow(analytics, Priority.ALWAYS);
VBox.setVgrow(personList, Priority.NEVER);
VBox.setVgrow(loanList, Priority.NEVER);
+ personListPanelPlaceholder.setMinHeight(0);
analyticsPanelPlaceholder.getChildren().add(analyticsPanel.getRoot());
}
}
diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml
index d027212c833..e9cbe8c1af8 100644
--- a/src/main/resources/view/MainWindow.fxml
+++ b/src/main/resources/view/MainWindow.fxml
@@ -47,16 +47,16 @@
-
+
-
+
-
+