Hi, I have a javafx application, its basically that game with tiles that makes a picture (But I'm doing it with movies).
So basically, in the
public void start(Stage primaryStage) method:
Board board = new Board(); [ THIS EXTENDS GROUP, AND HAS LOTS OF MEDIAVIEWS ADDED TO ITS CHILDREN]
Group root = new Group();
So basically, I want the scene to fit perfectly around the board, I think I have to use binding somehow,
but I'm being overwhelmed with code when I try to read the javafx api, and I'm not getting anywhere by just playing around with it.
Also, if the boards children get bigger or smaller, I'd like the scene to adjust its size, so it still fits nicely.
I'm not experienced with the Group element, but from the API I see:
-->A Group will take on the collective bounds of its children and is not directly resizable.
Why not making use of a StackPane as parent element, and instead of extending from Group, extend from a Tile Pane or a Flow Pane?
Those containers resizes easelly. Don't forget to set the Max Width and Max Height to MAX_VALUE!