[Dialog] DialogPane's expandable content does not grow and shrink vertically

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 8u40
    • Affects Version/s: 8u40
    • Component/s: javafx
    • None
    • Environment:

      Java 8u40 b11

      When dialog's expandable content is expanded, dialog window become resizable, but expandable content does not adapt vertically to window size changes. When window height is decreased, expandable contents pane even goes over the header text and graphic.

      Next code snippet can reproduce the issue when alert dialog is shown, expandable contents is expanded and then window height is manually increased and decreased.

      Alert alert = new Alert(Alert.AlertType.ERROR);
      alert.setHeaderText("Some error!");

      Label label = new Label("Some label:");
      TextArea textArea = new TextArea();
      textArea.setMaxHeight(Double.MAX_VALUE);

      VBox.setVgrow(textArea, Priority.ALWAYS);
      VBox expContent = new VBox();
      expContent.getChildren().addAll(label, textArea);

      alert.getDialogPane().setExpandableContent(expContent);
      alert.showAndWait();

            Assignee:
            Jonathan Giles
            Reporter:
            Vitomir Spasojevic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: