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();
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();
- relates to
-
JDK-8097786 [Dialog] DialogPane should also compute minSize/maxSize
- Closed