문제

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?

도움이 되었습니까?

해결책

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);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top