How to remove JavaFX stage buttons (minimize, maximize, close)

Anton picture Anton · Dec 1, 2011 · Viewed 63.3k times · Source

How to remove JavaFX stage buttons (minimize, maximize, close)? Can't find any according Stage methods, so should I use style for the stage? It's necessary for implementing Dialog windows like Error, Warning, Info.

Answer

Shardendu picture Shardendu · Jun 7, 2014

If you want to disable only the maximize button then use :

stage.resizableProperty().setValue(Boolean.FALSE);

or if u want to disable maximize and minimize except close use

stage.initStyle(StageStyle.UTILITY);

or if you want to remove all three then use

stage.initStyle(StageStyle.UNDECORATED);