Pregunta

My app looks different at same OS. This is Windows 7 rich interface:

enter image description here

And Windows 7 regular interface:

enter image description here

The only thing that makes me angry is sizing. In FXML it's 640x445, but Windows 7 makes it wider. How can I avoid that? Is there an approach to make TextArea fullscreen or something?

¿Fue útil?

Solución

To resize your stage at initialize you can use following code (i assume you use javafx-2?)

//stage.setResizable(true);

Screen screen = Screen.getPrimary();    
Rectangle2D bounds = screen.getVisualBounds();

stage.setX(bounds.getMinX());
stage.setY(bounds.getMinY());
stage.setWidth(bounds.getWidth());
stage.setHeight(bounds.getHeight());

or you can use fullscreen mode:

stage.setFullScreen(true);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top