-
Bug
-
Resolution: Fixed
-
P3
-
jfx13, 8u202
-
x86_64
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8238689 | 8u261 | Kevin Rushforth | P3 | Resolved | Fixed | b01 |
JDK-8247983 | jfx11.0.8 | Thiago Sayao | P3 | Resolved | Fixed |
ADDITIONAL SYSTEM INFORMATION :
$ uname -a
Linux orion 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2 (2019-08-28) x86_64 GNU/Linux
$ java -version
openjdk version "13" 2019-09-17
OpenJDK Runtime Environment AdoptOpenJDK (build 13+33)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.16.0, JRE 13 Linux amd64-64-Bit Compressed References 20190916_75 (JIT enabled, AOT enabled)
OpenJ9 - 867dab457
OMR - d4c85c31
JCL - 2858e3f001 based on jdk-13+33)
A DESCRIPTION OF THE PROBLEM :
As of JavaFX 13, a Dialog is only tall enough to display a single line of content text. If the content text contains one or more newline characters, the content area is still tall enough to accommodate only the first line of text, followed by an ellipsis.
In JavaFX 12, Dialogs properly accommodated multi-line text.
REGRESSION : Last worked in version 12.0.2
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a Dialog, and call its setContentText method with an argument that contains at least one newline character. Then show the Dialog.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The Dialog should be tall enough to show all lines of the content text. In JavaFX 12, this was the case.
ACTUAL -
In JavaFX 13, the Dialog only shows the first line of content text, followed by an ellipsis.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Dialog;
import javafx.scene.layout.BorderPane;
public class MultilineDialogTest
extends Application {
@Override
public void start(Stage stage) {
Scene scene = new Scene(new BorderPane(), 500, 500);
stage.setScene(scene);
stage.setTitle("Multi-line Dialog Test");
stage.show();
Dialog<ButtonType> dialog = new Dialog<>();
dialog.initOwner(stage);
dialog.setTitle("Multi-line Dialog");
dialog.setContentText("This\nis\na\ntest");
dialog.getDialogPane().getButtonTypes().add(ButtonType.CLOSE);
dialog.showAndWait();
stage.hide();
}
public static class Main {
public static void main(String[] args) {
Application.launch(MultilineDialogTest.class, args);
}
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Obtain the parent Window from the DialogPane's Scene, and size it manually.
FREQUENCY : always
$ uname -a
Linux orion 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2 (2019-08-28) x86_64 GNU/Linux
$ java -version
openjdk version "13" 2019-09-17
OpenJDK Runtime Environment AdoptOpenJDK (build 13+33)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.16.0, JRE 13 Linux amd64-64-Bit Compressed References 20190916_75 (JIT enabled, AOT enabled)
OpenJ9 - 867dab457
OMR - d4c85c31
JCL - 2858e3f001 based on jdk-13+33)
A DESCRIPTION OF THE PROBLEM :
As of JavaFX 13, a Dialog is only tall enough to display a single line of content text. If the content text contains one or more newline characters, the content area is still tall enough to accommodate only the first line of text, followed by an ellipsis.
In JavaFX 12, Dialogs properly accommodated multi-line text.
REGRESSION : Last worked in version 12.0.2
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a Dialog, and call its setContentText method with an argument that contains at least one newline character. Then show the Dialog.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The Dialog should be tall enough to show all lines of the content text. In JavaFX 12, this was the case.
ACTUAL -
In JavaFX 13, the Dialog only shows the first line of content text, followed by an ellipsis.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Dialog;
import javafx.scene.layout.BorderPane;
public class MultilineDialogTest
extends Application {
@Override
public void start(Stage stage) {
Scene scene = new Scene(new BorderPane(), 500, 500);
stage.setScene(scene);
stage.setTitle("Multi-line Dialog Test");
stage.show();
Dialog<ButtonType> dialog = new Dialog<>();
dialog.initOwner(stage);
dialog.setTitle("Multi-line Dialog");
dialog.setContentText("This\nis\na\ntest");
dialog.getDialogPane().getButtonTypes().add(ButtonType.CLOSE);
dialog.showAndWait();
stage.hide();
}
public static class Main {
public static void main(String[] args) {
Application.launch(MultilineDialogTest.class, args);
}
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Obtain the parent Window from the DialogPane's Scene, and size it manually.
FREQUENCY : always
- backported by
-
JDK-8238689 Dialog's preferred size no longer accommodates multi-line strings
- Resolved
-
JDK-8247983 Dialog's preferred size no longer accommodates multi-line strings
- Resolved
- relates to
-
JDK-8193502 [Linux] Dialog height switches between correct and too small when showing and hiding a Dialog repeatedly
- Resolved
-
JDK-8212060 [GTK3] Stage sometimes shown at top-left before moving to correct position
- Resolved
-
JDK-8236680 [Linux] Crash on exit when window with owned child window is closed
- Open
- links to
-
Commit openjdk/jfx/1952606a
(1 links to)