import javafx.application.Application; 
import javafx.geometry.Pos; 
import javafx.scene.Scene; 
import javafx.scene.control.Label; 
import javafx.scene.layout.VBox; 
import javafx.stage.Stage; 
import javafx.stage.StageStyle; 

public class Main extends Application { 

    @Override 
    public void start(Stage primaryStage) throws Exception { 
        primaryStage.setTitle("Hello World"); 
        primaryStage.setWidth(300); 
        primaryStage.setHeight(100); 
        primaryStage.initStyle(StageStyle.UNIFIED); 
        final VBox vBox = new VBox(); 
        vBox.setAlignment(Pos.CENTER); 
        vBox.setStyle("-fx-background-color: DarkGrey"); 
        vBox.getChildren().add(new Label("Hello World")); 
        primaryStage.setScene(new Scene(vBox)); 
        primaryStage.show(); 
    } 


    public static void main(String[] args) { 
        launch(args); 
    } 
} 