-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b140
According to change: "8145284: [Documentation] [TextField] Missing new line character handling"
"If {@code text} contains EOL character, then it will be replaced by space character."
EOL as defined by Java (System.lineSeparator()) is :
* <p>On UNIX systems, it returns "\n" and on Microsoft Windows systems it returns "\r\n".
Running the below mentioned code on Windows machine, should not provide a space as "\n" is not a valid EOL for Windows.
String text = "line1";
String text1 = "line2";
if(System.getProperty("os.name").contains("Win")) {
TextField textField = new TextField(text + "\n" + text1);
System.out.println(textField.getText());
}
If this has been done for the native level simulation, the spec need to change accordingly. It has to mention "EOL" and "\n" (For windows)
"If {@code text} contains EOL character, then it will be replaced by space character."
EOL as defined by Java (System.lineSeparator()) is :
* <p>On UNIX systems, it returns "\n" and on Microsoft Windows systems it returns "\r\n".
Running the below mentioned code on Windows machine, should not provide a space as "\n" is not a valid EOL for Windows.
String text = "line1";
String text1 = "line2";
if(System.getProperty("os.name").contains("Win")) {
TextField textField = new TextField(text + "\n" + text1);
System.out.println(textField.getText());
}
If this has been done for the native level simulation, the spec need to change accordingly. It has to mention "EOL" and "\n" (For windows)
- relates to
-
JDK-8145284 [Documentation] [TextField] Missing new line character handling
-
- Resolved
-
-
JDK-8055197 TextField deletes multiline strings
-
- Resolved
-