JavaFX Controller Method Not Found


Question

A few weeks ago, after having learnt the basics of Java, I found JavaFX. I thought it'd be very useful, as simply, I dislike making applications using JFrame. It's just so limited and complicated in my opinion.

I'm making the .fxml files using SceneBuilder, and I'm coding the actual thing in Eclipse. I make sure to reload the project after I edit a file in SceneBuilder, and I occasionally test the program after I make changes.

I've run into the following error: http://pastebin.com/n99ccdiB

My Controller Class (in the proper location..): http://pastebin.com/LfhWbP70

My .fxml File: http:// pastebin.com/YsV8EkcD

Does anyone know how to fix this? It's the only thing giving me an error, and it's quite frustrating.. Note that there are no mistakes in the WindowHandler and DatabaseHandler classes, and they work fine with other things.

1
1
4/1/2014 8:14:59 PM

Also, when I try to do so, it gives me a warning: "Parameter 'event' is not assignable to javafx.event.Event"

So, there's your problem. You have the wrong import in your Controller: you have the java.awt.event.ActionEvent instead of the JavaFX ActionEvent.

6
4/1/2014 9:24:52 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon