Scene Builder and <fx:root>

Werner Lehmann lehmann at media-interactive.de
Thu Jul 12 10:08:37 PDT 2012


Daniel,

On 12.07.2012 18:28, Daniel Fuchs wrote:
> As Greg says - you will need to provide a value for the
> fx:type attribute in fx:root - and you should be able
> to load that in SceneBuilder.
>
> SceneBuilder does not allow you to set fx:root from within
> SceneBuilder itself (I mean, if you create an FXML from
> within SceneBuilder it will not have the fx:root element) - but
> if you load an FXML whose root element is fx:root then
> SceneBuilder should be able to load it, and will preserve it.

that works indeed. I just had to use "BorderPane" as fx:root type 
attribute value instead of my derived class which SB cannot know about.

What about my other question as to how custom controls can be used in 
Scene Builder? Can I add them to the library, and would it pick up any 
new properties on the right hand side of the SB window? Or, is it 
possible to just manually edit that part of the FXML but still use SB 
for the rest of it?

Werner


More information about the openjfx-dev mailing list