If you happen to come across this error in you FXML file and you find out that you did mentioned fx:controller tag in your FXML file and its RED underline, then it means that your Netbeans needs update.
When you install Netbeans initally, it will show you some updates after connecting to internet. If you somehow ignore them or failed to update then these errors will show up. Remember that these errors will only show up when you save the project using Scene Builder. Scene Builder has latest update of JavaFx package than Netbeans. Upon updation, both will have same versions.
Here is the code that you will find in FXML file using Netbeans IDE :
whereas after saving the file using Scene Builder, the above line will change to :
After updating the Netbeans, there will be no more Red Underlines on the above code. Updating Netbeans is quite simple.Easy Peasy!
When you install Netbeans initally, it will show you some updates after connecting to internet. If you somehow ignore them or failed to update then these errors will show up. Remember that these errors will only show up when you save the project using Scene Builder. Scene Builder has latest update of JavaFx package than Netbeans. Upon updation, both will have same versions.
Here is the code that you will find in FXML file using Netbeans IDE :
...xmlns:fx="http://javafx.com/fxml" fx:controller="netbeansjavafxtest.FXMLDocumentController">
whereas after saving the file using Scene Builder, the above line will change to :
...xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2"
fx:controller="netbeansjavafxtest.FXMLDocumentController">
After updating the Netbeans, there will be no more Red Underlines on the above code. Updating Netbeans is quite simple.Easy Peasy!
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeletealready i work on netbeans 8.0.2 and using scene builer 2.0
ReplyDeletebut still error ocur .
in FXML file when i performe action on button onAction="#handleActiozn" it show error
controller is not define on rootcomponents so help me
Right statement is onAction= "handleAction"
ReplyDeleteIf you are on netbeans with scene builder maybe checking controller in library and assign the controller class.
ReplyDeleteJust right click and select make controller
ReplyDelete