Here is the source fxml file (import is omitted for brevity):
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
minWidth="-Infinity" prefHeight="600.0" prefWidth="800.0"
xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:id="pane"
fx:controller="com.github.parboiled1.grappa.debugger.mainwindow.MainWindowUi">
<top>
<MenuBar BorderPane.alignment="CENTER">
<Menu mnemonicParsing="false" text="File">
<MenuItem fx:id="loadInput" mnemonicParsing="false"
text="Load file" onAction="#loadFileEvent"/>
<MenuItem fx:id="parse" mnemonicParsing="false"
text="Parse" onAction="#parseEvent"/>
<MenuItem fx:id="closeButton" mnemonicParsing="false"
text="Close" onAction="#closeWindowEvent"/>
</Menu>
</MenuBar>
</top>
<center>
<SplitPane dividerPositions="0.5" prefHeight="160.0" prefWidth="200.0"
BorderPane.alignment="CENTER">
<SplitPane dividerPositions="0.5" orientation="VERTICAL">
<TreeView fx:id="traceTree" prefHeight="200.0"
prefWidth="200.0" style="font-family: monospace"/>
<TextArea fx:id="traceDetail" editable="false"
prefHeight="200.0" prefWidth="200.0"
style="-fx-font-family: monospace"/>
</SplitPane>
<TextArea fx:id="inputText" prefHeight="200.0" prefWidth="200.0"/>
</SplitPane>
</center>
</BorderPane>
I want to perform text selection of a part of the text in what is currently TextAreawith fx:idfrom inputText. For this, I was recommended to use TextFlowinstead TextArea. "The XML Comment": HERE.
I already have an βXML commentβ INJECTION, a way to populate the contents with the inputTextcontents of a (text) file. This works great with TextArea.
Now, what I did: I just replaced TextAreawith TextFlow, adapted the code and it. Nothing else.
, . , :

, , TextFlow , ... , :

TextArea. "" ( ) MenuBar , .
a TextArea ... TextFlow.
TextFlow behave, "layout-wise", TextArea?