I made Button
with max width of 300 and input a long text in it. Button
got max size, but FlowPane
, which also has max size of 300, grew in width. How comes that Button
text is affecting FlowPane
width? How to prevent it from happening?
Screenshot:
FlowPane
is marked with yellow border.
Button
settings:
FlowPane
settings:
Place the FlowPane
inside an AnchorPane
. Set the AnchorPane
sizes to the FlowPane
sizes. At the very least, set the left and right AnchorPane
constraints of the FlowPane
to 0.
Is
FlowPane
really the Node you want here?