Reputation: 211
I am Loading a Fxml file in scene builder and it's showing me the below error. I had external date picker code and i have commented it all still it's showing the error. Any help would be appreciable.
Loading of xyz.fxml
has failed. Make sure it is a valid fxml file.
error: java.lang.UnSupportedOperationException
FXML
<AnchorPane id="AnchorPane" fx:id="view" " xmlns:fx="javafx.com/fxml"; fx:controller="com.nubes.labour.controller.DataSyncController">
<children>
<TextField fx:id="hoursText" layoutX="451.0" layoutY="342.0" prefWidth="45.0" />
<!-- <DatePicker id="toDatePick" fx:id="toDate" layoutX="448.0" layoutY="297.0" prefHeight="26.0" prefWidth="140.0" /> -->
</children>
</AnchorPane>
Upvotes: 1
Views: 1343
Reputation: 36722
There are multiple issues in your fxml. It has an unwanted ;
and "
. The xmlns
is also incorrect. I am not sure if you have the imports or just missed them while editing. Try the following fxml:
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" fx:id="view" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.nubes.labour.controller.DataSyncController">
<children>
<TextField fx:id="hoursText" layoutX="451.0" layoutY="342.0" prefWidth="45.0" />
<!-- <DatePicker id="toDatePick" fx:id="toDate" layoutX="448.0" layoutY="297.0" prefHeight="26.0" prefWidth="140.0" /> -->
</children>
</AnchorPane>
Upvotes: 3