I\'m starting off with JavaFX.
The error occurs when I execute my program, before I attempted to do this, it worked fine and button clicks worked, but that was befor
Inside your FXML
, you have defined a Text
, where as in your Controller, you are trying to use it as Label
.
The stackTrace (error) is shouting it on the top of its voice :
Can not set javafx.scene.control.Label field application.SceneController.myLabel to javafx.scene.text.Text
In your controller, you need to change the myLabel
definition to
@FXML
private Text myLabel;