A
A
Alexey2022-02-09 23:58:56
Java
Alexey, 2022-02-09 23:58:56

Why is the JavaFX controller not loading?

In the com.app.view package I have a controller. Even if nothing is added to it, I am catching javafx.fxml.LoadException.
IDEA generated a resources folder for me. In it, I created the com.app.view folders and added a .fxml file, in which I wrote fx:controller="com.app.view.Controller"
I tried to add this controller above, to the com.app package, and register it in .fxml com.app.Controller file - everything starts up and works

Why is this happening? Because of which?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2022-02-10
@MicroKlizma

In general, I still understood what the problem was, it was necessary to add this package to the module-info.java file
Namely, add the line
opens com.app.view to javafx.fxml;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question