Question

Using JavaFX2.2 along with SceneBuilder 1.0 in NetBeans to take advantage of the seamless development environment it provides. I would like to add the controls from the JFXtras lab, and as such, I'd like to find out if it's possible to integrate the JFXtras controls into SceneBuilder. I found a document from Oracle regarding loading jar files into SceneBuilder to make it aware of custom controls. The documentation claims that you might not be able to actually use the control in SceneBuilder, but its controls would be 'passed through' untouched so you could actually save the file without losing the added custom controls. Well, I've tried, and it doesn't seem to work. I can't actually load the fxml file, getting exceptions about instantiation of bean failed. Has anyone been able to use JFXtras with SceneBuilder?

Was it helpful?

Solution

I'm using JFXtra in my project but I have to manually add them in the FXML code with the correct fx:id and stuff. SceneBuilder then holds free the place where the JFXtra node should be. Do you have the correct import and classpath in your FXML file?

<?import jfxtras.labs.scene.control.*?>
<?scenebuilder-classpath-element ../../../libraries/JFXtras2/jfxtras-labs-0.1.jar?>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top