I am just starting out with JavaFX, and I am trying to build a simple application with a label, text field and button which, when clicked, sets the label\'s value to that of
The same problem happened to me. It's because of maven library. I have different version of jfoenix library in scene builder jfoenix:0.1.8 and in IDE jfoenix:9.0.9.so i downloaded the same version in both and it worked for me.
And also for the nullpointer exception this code worked for me:
FXMLLoader fxmlLoader=new FXMLLoader (Main.class.getResource ("sample.fxml"));
Parent root =fxmlLoader.load ();
The fxml file and Main is in same package.