简体   繁体   中英

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;

分组按钮

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM