Home:ALL Converter>How to stop text from overflowing on Java FX

How to stop text from overflowing on Java FX

Ask Time:2017-05-04T17:21:11         Author:tablecloth26

Json Formatter

I am outputting text to a textarea in Java FX but how do I prevent the user from using a scroll bar to navigate to the end of text and stop the text from overflowing? (please see the image below)

Java FX text overflow image

Below is the code in my GUI.fxml class

<Tab closable="false" text="Second Link">
     <content>
        <SplitPane dividerPositions="0.5" prefHeight="160.0" prefWidth="200.0">
          <items>
            <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
                 <children>
                    <TextArea fx:id="secondText" layoutX="22.0" layoutY="48.0" prefHeight="511.0" prefWidth="571.0" />
                    <TextField layoutX="215.0" layoutY="14.0" text="           Original Text" />
                 </children></AnchorPane>
            <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="363.0" prefWidth="292.0">
                 <children>
                    <TextField layoutX="215.0" layoutY="14.0" text="             Summary" />
                    <TextArea layoutX="16.0" layoutY="48.0" prefHeight="511.0" prefWidth="571.0" />
                 </children>
              </AnchorPane>
          </items>
        </SplitPane>
     </content>
</Tab>

Any help would be greatly appreciated, thanks in advance.

Author:tablecloth26,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/43778830/how-to-stop-text-from-overflowing-on-java-fx
yy