Here's my problem: I would like to get a Pane with horizontal orientation and a width fitting with his content (like FlowPane), but if the width is too high, the Pane wraps its content. I don't want to calculate the 'prefWidth' or 'prefWrappingLength' by the children width because they are plentiful.
In the thread JavaFX FlowPane Autosize, they are giving solutions for wrapping text, but not for layouts.
Have you some tips for me?
For those who are looking for an answer, here's what I finally did, ignoring the plentiful children constraint:
This is a pretty dirty code, especially for the
Thread.sleep(50)
used to have the final width of children. So if someone owns a better solution, please give it!