Nie działa mi linijka z ** AnchorPane anchorPane = loader.load();**
package jacpio.game.JavafxGra;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class JavafxGraApplication extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(this.getClass().getResource("fxml/scena1.fxml"));
AnchorPane anchorPane = loader.load();
Scene scene = new Scene(anchorPane,300,300);
stage.setScene(scene);
stage.setTitle("Okno");
stage.show();
}
}