Limit JavaFX scene size with minimum and maximum root sizes

I have resizable with flexible layout. I would like the width and height of the scene not to decrease below the minimum width and height of the corresponding root node.

I searched the site and found a few suggestions to link the steps minWidthand minHeightto the properties minWidthand minHeightthe root node. But the property is Region minWidthnot the value of the minimum width, but the policy for calculating it. In most cases, it is set to USE_COMPUTED_SIZE, and therefore the actual minimum width is calculated by each pass of the layout. How to link the actual calculated minimum width and height with the corresponding properties of the stage?

+4
source share

All Articles