I have custom component with layout on FXML file which containts line
<fx:root type="javafx.scene.layout.VBox" spacing="10.0" xmlns:fx="http://javafx.com/fxml">
I create this file on SceneBuilder 1.0, but then i try open this file on SceneBuilder 2.0 i got Exception
java.io.IOException: javafx.fxml.LoadException: Root hasn't been set. Use method setRoot() before load.
/Users/dmitrynelepov/Development/SogazGit/smpb/SMProjectBrownRelease/SMPBProxy/engine/fxml/component_daemon_viewer.fxml:14
Also must to tell: in applications this fxml loadings fine with setting root by code.
In official tutorial (http://docs.oracle.com/javafx/2/fxml_get_started/custom_control.htm) tells:
<fx:root type="javafx.scene.layout.VBox" xmlns:fx="http://javafx.com/fxml">
<TextField fx:id="textField"/>
<Button text="Click Me" onAction="#doSomething"/>
</fx:root>
As u can see Oracle tells:Delete the AnchorPane markup that NetBeans IDE automatically generated.
But it's not working.
UPDATE
SceneBuilder 2.0 Build 7 - the problem persists
JDK8 b117 - the problem persists
Link JIRA: https://javafx-jira.kenai.com/browse/DTL-5968
Thanks for SceneBuilder developers.
Bug with https://javafx-jira.kenai.com/browse/DTL-5968 has fixed.
And on SceneBuilder 2.0 build 9 - problem was solved.
Question closed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With