Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8093133

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u40
    • 8u40
    • javafx
    • None
    • 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();

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

              Created:
              Updated:
              Resolved:
              Imported: