Question

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?

Was it helpful?

Solution

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);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top