Apply different styles to strings in a single TextArea in JavafX


Question

Is there a way to style a substring of the text in a TextArea? setStyle() method is only available to the TextArea class.

1
4
12/4/2013 9:21:36 PM

Accepted Answer

If you are using JDK 8, then this can be achieved by using RichTextFX. It allows you to add style classes to text ranges.

5
11/4/2016 10:58:22 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon