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

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

    XMLWordPrintable

    Details

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

      Java 8u40 b11

      Description

      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();

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported: