I'm making a simple graphical desktop application for image management and, I'm using JavaFX, in addition to its sceneBuilder.
The idea is, by giving a button that a FileChooser appears, to choose the image and to show a new window with all the background image on it the problem is that by doing it gives me an error that I can not identify.
Edit: I have discovered that if I open the image in the same window there is no error, only when doing it in a new one.
This is my code.