package com.zaliczenie.projekt;


 import javafx.application.Application;
 import javafx.scene.Parent;
 import javafx.scene.Scene;
 import javafx.stage.Stage;
 import javafx.fxml.FXMLLoader;

public class Main extends Application {
     @Override
     public void start(Stage stage) throws Exception {
         Parent root = FXMLLoader.load(getClass().getResource("/MainWindow.fxml"));

         Scene scene = new Scene(root, 300, 275);

         stage.setTitle("FXML Welcome");
         stage.setScene(scene);
         stage.show();
     }

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

package com.zaliczenie.projekt;a


 import javafx.application.Application;
 import javafx.scene.Parent;
 import javafx.scene.Scene;
 import javafx.stage.Stage;
 import javafx.fxml.FXMLLoader;

public class Main extends Application {
     @Override
     public void start(Stage stage) throws Exception {
         Parent root = FXMLLoader.load(getClass().getResource("/MainWindow.fxml"));

         Scene scene = new Scene(root, 300, 275);

         stage.setTitle("FXML Welcome");
         stage.setScene(scene);
         stage.show();
     }

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

Update Main.java