I checked out many sources on how to fix this problem! I am using Java 15, and I have the RichTextFX jar file version 0.10.6 installed. I am getting this error but I do not know why, as according to documentations I am doing everything correctly. JavaFX also works fine for me, I have javafx 16 installed. This is my code:
CodeArea codeArea = new CodeArea();
@Override
public void start(Stage stage) throws Exception {
// TODO Auto-generated method stub
MenuBar menuBar = new MenuBar();
Menu menu1 = new Menu("File");
Menu menu2 = new Menu("Edit");
Menu menu3 = new Menu("Project");
Menu menu4 = new Menu("Window");
Menu menu5 = new Menu("Help");
menuBar.getMenus().add(menu1);
menuBar.getMenus().add(menu2);
menuBar.getMenus().add(menu3);
menuBar.getMenus().add(menu4);
menuBar.getMenus().add(menu5);
BorderPane borderPane = new BorderPane();
HBox statusbar = new HBox();
TabPane tabPane = new TabPane();
codeArea.setParagraphGraphicFactory(LineNumberFactory.get(codeArea));
Tab tab1 = new Tab("Untitled", codeArea);
tabPane.getTabs().add(tab1);
borderPane.setTop(menuBar);
borderPane.setCenter(tabPane);
borderPane.setBottom(statusbar);
Scene scene = new Scene(borderPane);
stage.setScene(scene);
stage.setMaximized(true);
stage.setTitle("Gooye");
stage.show();
}