JavaFX code editor with content highlighter for Java Code

javajavafxjavafx-2

I want to write a text editor in JavaFX which acts similar to Eclipse/Netbeans IDE to highlight the Java code.
Can anyone suggest as to how it can be achieved or anyone has done this previously.

Thanks.

Best Solution

There's no pure JavaFX libraries for the code highlighting / editing as far as I know, so if you want to implement it in JavaFX you're going to be translating from a similar Swing (or other) project, or you're on your own.

However, you can use such a Javascript library and wrap it in a WebView if you want to achieve this - Jewelsea (who often swings by here) has done just this and explained it rather nicely here.