user5500750
user5500750

Reputation:

Eclipse JavaFX Scene Builder add ButtonBar or grouped buttons to GUI

I building a desktop app in Eclipse Oxygen.1a Release (4.7.1a) using JavaFX, which will be my first. I have created a file called PersonOverview.fxml and I have added the following code to my code;

<ButtonBar>
    <buttons>
        <Button text="New" ButtonBar.buttonData="LEFT" />
        <Button text="Save" ButtonBar.buttonData="RIGHT" />
    </buttons>
</ButtonBar>

JavaFX Scene Builder 2.0 does not seem to recognize the element - ButtonBar

I am wondering if there is an alternative to this. I would like to add a group of buttons to my GUI at the very bottom right of the GUI. Something like this;

Grouped buttons

Upvotes: 1

Views: 1388

Answers (1)

Jos&#233; Pereda
Jos&#233; Pereda

Reputation: 45456

SceneBuilder 2.0 was the latest release from Oracle and it was before Java 8u40, which means that it doesn't contain controls like ButtonBar or Spinner that were added in 8u40.

To be able to work with fully JavaFX 8/9 compatible fxml files, you need SceneBuilder from Gluon. You can download your binary from here.

The project is still open source, you can find it here, it is not only updated with the latest changes in JDKs 8 and 9, but also new features are being included.

Upvotes: 3

Related Questions