I am working on a code editor for java which will be used in Parallel Computing and Distributed Computing. I'm looking for an alternate to RSyntaxTextArea in Javafx, bcz i tried to implement it in Javafx and it is not working well, like sometimes half of the text area doesn't show and cursor lags in the text area.
Tab textTab = new Tab("Sample Tab");
RSyntaxTextArea ta= new RSyntaxTextArea();
SwingNode sn = new SwingNode();
String text="";
ta.setText(text);
ta.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
ta.setAntiAliasingEnabled(true);
ta.setCodeFoldingEnabled(true);
RTextScrollPane sp = new RTextScrollPane(ta);
sn.setContent(sp);
textTab.setContent(sn);
I am newbie in Javafx, so i don't know much how to fix these issues. It also doesn't match the beauty of Javafx.
i have created my own class from RichTextFX here is the code
But you have to add JAR file from the RichTextFX in your libraries. However i don't posses knowledge about css. So i couldn't improved it in styling or theming(i wanted to set Monokai Look and feel to syntax Text Area, But don't worry i will find a way someday. Or i somebody do find before me please share.) Thanks all for your suggestions and help especially @James_D.