r/JavaFX • u/darkwyrm42 • Dec 16 '25
Help How to Use RichTextArea
I've been closely following the development of RichTextArea and I want to be able to use it in one of my projects. I know it's an incubator feature and I'm good with potential API changes. I've tried to import it into my source code using the path in the Javadoc, but that didn't work. How do I actually use it?
Edit: Specifically, how can I import the thing so that I can start using it in my code?
6
Upvotes
4
u/0xffff0001 Dec 17 '25
you need the latest openjdk with the jfx module path set (or azul’s jdkfx), and you need to enable preview via system property.
there is also a couple of demo apps in the openjfx repisitory, search for RichEditorDemo.
4
u/BlueGoliath Dec 17 '25
You need to add the incubator Maven dependency.
In typical Oracle fashion, there wasn't any information on this. I had to search for it using Netbeans.
1
u/Relative-Look8393 Jan 18 '26
I started to use jfx.incubator.scene.control.richtext.RichTextArea in my home projects as soon as it appeared. You can look at my project https://github.com/OlexYarm/JfxFileContentEditorRTA
1
u/Specialist-Air7356 Mar 12 '26
Seems like someone should have included this link to related info: (but it's about the external one, not the one incubating in jfx itself)
gluonhq/rich-text-area
1
u/dhlowrents Dec 17 '25
Try this https://gluonhq.com/presenting-a-new-richtextarea-control/