Amr Emaish
Amr Emaish

Reputation: 177

stage without bar (javafx)

I want to make a window like eclipse loading by javafx without the bar ,

what I can do !!?

this loading screen

enter image description here

Upvotes: 2

Views: 2597

Answers (2)

Venkat Prasanna
Venkat Prasanna

Reputation: 732

Just use this line. You won't see any title bar in your application.

stage.initStyle(StageStyle.UNDECORATED);

Upvotes: 2

blackhazelnut
blackhazelnut

Reputation: 60

hihi,

you could try this:

@Override
public void start(Stage primaryStage) {
    try {
        BorderPane root = new BorderPane();
        Scene scene = new Scene(root,400,400);
        scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
        primaryStage.initStyle(StageStyle.UNDECORATED);
        scene.setFill(Color.BLACK);
        primaryStage.setScene(scene);
        primaryStage.show();
    } catch(Exception e) {
        e.printStackTrace();
    }
}

Upvotes: 1

Related Questions