Reputation: 593
I want to make a primary Stage a non-expandable window in JavaFX. So, i don't want to widen or increase height, when i run my application. I set size on anchor pane, which is my main layout, max sizes and minimum sizes. And this is not working. Thanks for help.
Upvotes: 0
Views: 190
Reputation: 2210
Set max i min size of your Stage
:
primaryStage.setMaxHeight(height);
primaryStage.setMinHeight(height);
primaryStage.setMaxWidth(width);
primaryStage.setMinWidth(width);
or call
primaryStage.setResizable(false);
Upvotes: 1