OK, I've been on this all day, and can't seem to make any sense of what is going on.
I have a TabPane, and within that, a Tab, the Tab's content is an AnchorPane, and within that, a SplitPane.
On the right side of the SplitPane, I have a ScrollPane, within that, a VBox. Into that VBox I put controls I've built in FXML, so they come one after another. That all works fine.
I've used AnchorPanes pretty much every to handle the resizing of my window, and it all works fine, except when I shrink the SplitPane containing the ScrollPane. When I enlarge my window, everything works fine, everything moves in accordance to it's anchor point, and it looks nice. When I come to shrink the window, though the ScrollPane essentially refuse to shrink, and my UI becomes all messed up because of it, the SplitPane seems to get pushed out of the window, because it can no longer shrink, because the ScrollPane won't.
This only happens on shrinking the window, if I start off with the window at a tiny size, the UI is fine, but if I then stretch out the window, and then return it to it's original size, the UI is all messed up. It's almost like once I stretch out the ScrollPane with anchor points, it'll refuse to get any smaller after that. There seems to be a bit of correlation with the content of the VBox in the ScrollPane, an empty VBox seems to allow the ScrollPane to shrink a bit more, but it's still problematic.
So basically, if I open up the Stage at 100x100 pixels, UI looks fine. If I then stretch out the window to 800x800, looks fine, if I think resize to 500x500, UI is messed up. So it's not like the UI won't fit, it's that once made bigger, it seems my ScrollPane refuses to shrink again.
I'm pretty much out of ideas at the moment, the rest of my app is also put together with AnchorPanes, and works fine.
Any thoughts, anything at all, much appreciated.
Garry