JavaFX SceneBuilder 2.0 doesn't open FXML for custom components with fx:root as main layout tag

£可爱£侵袭症+ 提交于 2019-12-01 05:10:26

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.

Not quite fixed for me. I am still getting this error.

java.io.IOException: javafx.fxml.LoadException: Root hasn't been set. Use method setRoot() before load. 
/C:/path-to-my-fxml/foo.fxml:11

at com.oracle.javafx.scenebuilder.kit.fxom.FXOMLoader.load(FXOMLoader.java:86)
at com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument.<init>(FXOMDocument.java:74)

With the latest version of Scenebuilder 2.0 dev release:

Build Information Version: 2.0-b09, Changeset: 12f988d79fe6 Date:
2013-12-19 09:33

Not sure what the workaround is at this point other than to keep on switching the fx:root for a concrete container object. Bummer.

  • chooks
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!