I'm working on going through a tutorial to learn about JavaFX with Scene Builder and I use IntelliJ IDEA instead of Eclipse, which is what the tutorial used. I made a Javascript project in IDEA and it made my src
, projectX
, Controller.java
, Main.java
, and projectX.fxml
files for me.
I have the project open in Scene Builder now and I added a controller class to the anchor pane, which it autocompletes for me because it recognizes that I have a controller class and it looks correct.
However, when I go back to my .fxml file, it has my controller label in red as an error, and says No controller specified for top level element.
It also says Cannot resolve class or package projectX.
What the hell am I supposed to do differently? I followed the tutorial exactly...
The project file structure is as follows:
ProjectX > src > ProjectX (package) > Controller.java > Main.Java > ProjectX.fxml
Here's the error in the .fxml file: http://gyazo.com/ad16dc55cc3ba59ebf9e60e2497f03af
And in Scene Builder, this is what I typed in "Controller class": Main.ProjectBonify.Controller
ALSO TRIED: ProjectBonify.Controller
Neither work.
Thanks in advance.