//Шаблон 
import javafx.application.Application; 
import javafx.geometry.Pos; 
import javafx.scene.Scene;  
import javafx.scene.control.Label; 
import javafx.stage.Stage;
 
public class HelloWorldApplicationFX extends Application { 
 
    @Override 
    public void init() throws Exception {
        super.init();
        System.out.println("Inside init() method! Perform necessary initializations here.");
    }  
      
    @Override
    public void start(Stage primaryStage) throws Exception { 
        Label label = new Label("Hello World");
        label.setAlignment(Pos.CENTER); 
        Scene scene = new Scene(label, 500, 350);

        primaryStage.setTitle("Hello World Application");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    @Override
    public void stop() throws Exception {
        super.stop();
        System.out.println("Inside stop() method! Destroy resources. Perform Cleanup.");
    }

    public static void main(String[] args) {
        launch(args);
    }
}
