You can define the style using the method initStyle()
who receives a Stagestyle of your Stage.
Ex.:
public class HelloWorld extends Application {
@Override
public void start(Stage stage) {
Text text = new Text(10, 40, "Hello World!");
text.setFont(new Font(40));
Scene scene = new Scene(new Group(text));
stage.initStyle(StageStyle.UNDECORATED)
stage.setTitle("Welcome to JavaFX!");
stage.setScene(scene);
stage.sizeToScene();
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
The possible values are:
DECORATED
Defines a normal Stage style with a Solid white background and Platform decorations.
Defines a stage style with a solid white background
TRANSPARENT
Defines a Stage style with a Transparent background and no decorations.
Defines a stage style with a transparent background and decorations.
UNDECORATED
Defines a Stage style with a Solid white background and no decorations.
Defines a stage style with a white background and no decorations
UNIFIED
Defines a Stage style with Platform decorations and eliminates the border between client area and decorations.
Defines a stage style with decorations and eliminates the edge between the client area and the decorations
UTILITY
Defines a Stage style with a Solid white background and minimal Platform decorations used for a Utility window.
Defines a stage style with a solid white background and minimal decorations used by a utility screen.
To leave in full screen, you can call the method setFullScreen(Boolean value), true
to start full screen, false otherwise
What have you tried?
– Renato Junior
So, nothing kkkkkk pq did not find anything that could remove it. Or appeared from other languages , or unrelated coiisas.
– TheJ
@RORSCHACH the question seems very short, but it is totally possible to answer, he is not necessary to want to change something, but rather to do something based on the Javafx API, just as Deins answered.
– Guilherme Nascimento