Maximized undecorated stage
Abhinay Agarwal
abhinay_agarwal at live.com
Mon Jan 6 09:43:22 UTC 2020
Hi,
If maximize property is set to true for an undecorated Stage, the following behaviour is observed on different platforms:
* Windows: Undecorated stage is maximized
* MacOS: Undecorated stage is not maximized
* Linux(Ubuntu): Undecorated stage is not maximized
The following piece of code can be used to reproduce the behaviour:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
public class MaximizedStage extends Application {
public void start (Stage stage) {
StackPane sp = new StackPane(new Label("Hello"));
stage.setScene(new Scene (sp, 500, 500));
stage.initStyle(StageStyle.UNDECORATED);
stage.show();
stage.setMaximized(true);
}
}
Is there a reason why the stage gets maximized on Windows but fails on other platforms?
Regards,
Abhinay
More information about the openjfx-dev
mailing list