Possible Duplicate:
Highlighting Strings in JavaFX TextArea
how to highlight the text in the textarea? For example in ms-word if we write the text in the find option the same text will highlight in the text area in the same way i wanted to do that in javafx can any one help me?
Unfortunately rich text is not yet supported (fx 2.2).
You can try next workarounds:
- Use RichTextEditor
- Use WebView
- Draw several Text on Canvas
- Just put Text/Labels with different formatting in HBox or TilePane.
- Create a transparent pane over the TextArea and draw an opaque highlights, but this can be hard due to complexity of finding out exact words coordinates.