Reputation: 589
I want to make a full-screen application with javaFX .. i used stage.setFullScreen(true);
every time i change the scene like this
@Override
public void start( Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("Language.fxml"));
Scene scene = new Scene(root);
stage.setFullScreen(true);
stage.setScene(scene);
stage.show();
}
the problem is while transition the full screen appears to be turned off then back on instantly and the "press esc ... " sign appears every single scene
is there a solution for this ?!
Upvotes: 1
Views: 572
Reputation: 589
The problem of full screen was solved by adding
stage.initStyle(StageStyle.TRANSPARENT);
stage.initStyle(StageStyle.UNDECORATED);
to the stage and removing setFullScreen(true);
from every scene except the main one !
Upvotes: 0
Reputation: 418455
You can set the text that is displayed when entering full-screen with the Stage.setFullScreenExitHint(String value)
method.
Quoting from the javadoc:
A value of
null
will result in the default per-locale message being displayed. If set to the empty string, then no message will be displayed.
Set an empty String
to disable it:
stage.setFullScreenExitHint("");
Upvotes: 1