code: private void loadLastWindowState() {
      if (persistWindowState) {
        setPrefSize(storageHandler.loadWindowWidth(), storageHandler.loadWindowHeight());
        getScene().getWindow().setX(storageHandler.loadWindowPosX());
        getScene().getWindow().setY(storageHandler.loadWindowPosY());
        model.setDividerPosition(storageHandler.loadDividerPosition());
        model.setDisplayedCategory(model.loadSelectedCategory());
      } else {
        setPrefSize(Constants.DEFAULT_PREFERENCES_WIDTH, Constants.DEFAULT_PREFERENCES_HEIGHT);
        getScene().getWindow().centerOnScreen();
      }
    }
docs: Loads last saved size and position of the window.