This content has been marked as final. Show 4 replies
You can find out the Window (Stage) a node is in with node.getScene().getWindow().
You can resize a Window to fit the preferred size of its scene with window.sizeToScene().
Maybe that can help with your problem.
Hi,1 person found this helpful
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!
Hope this helps..
Marvellous, I put the sizeToScene() method in the board class, just after the Tiles are added, and it works.
Thanks for that, it was critical part of my program.
I just need to get my MenuBar to stretch across the size of the window, there's currently a big gap to the right of the FileMenu,
I'm not too sure how to do it.
Thanks for help, didn't see your message till just, I will have a play around with it soon. Thanks