This is probably related to RT-16628. Take this example:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.stage.Stage;
public class TextAreaReadOnly extends Application {
public TextAreaReadOnly() {
}
@Override
public void start(Stage primaryStage) throws Exception {
TextArea textarea = new TextArea();
textarea.setText("| Apples | Oranges |");
textarea.setEditable(false);
Scene scene = new Scene(textarea, 600, 400);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
If you run it (on Windows) and double click on Apples, it will select Apples, the following space, the pipe sign and the space after the pipe-sign. It should stop right after the first space. This at least is what input fields, notepad and wordpad do under Windows
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.stage.Stage;
public class TextAreaReadOnly extends Application {
public TextAreaReadOnly() {
}
@Override
public void start(Stage primaryStage) throws Exception {
TextArea textarea = new TextArea();
textarea.setText("| Apples | Oranges |");
textarea.setEditable(false);
Scene scene = new Scene(textarea, 600, 400);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
If you run it (on Windows) and double click on Apples, it will select Apples, the following space, the pipe sign and the space after the pipe-sign. It should stop right after the first space. This at least is what input fields, notepad and wordpad do under Windows