I'm currently working on a poker application for fun and I've encountered another issue when trying to work with imageviews.
Right now my structure for my images is the following: JavaFXApplication1\src\images
that "images" folder contains two more folders, one being "cards" and the other "playerImages". Here is a screenshot of it also:project structure
Currently I am using a document relative path within scene builder to initially load the images for each of the cards and players. for each of the cards, the imagepath initially is "@..\images\cards\back.png" which is set in scenebuilder. this method works perfectly fine when launching the application. however, for the player images next to the cards, i have "@..\images\playerImages\player1.png" for example and this doesnt work for some reason.
In scenebuilder the "player1.png" image shows up where it should, but disappears when i launch everything.
I read through Images not showing on launch by the main, but showed on Scene builder but Im not not sure the solution for that is the same for me, as my images are in my source folder.
I tried using the fx:id and setting the image manually in my controller class, but was receiving an error stating that my input stream was null.
I also tried just adding "player1.png" to my root images folder and using that path, and that still didnt work. yet, when I change the player1 image path to anything in the cards folder it works. I dont understand why it works for the images in the cards folder but not in the playerImages folder. Both of those folders are in the same location.
I apologize if this was already answered somewhere else and i am too oblivious to see it, but any insight into this seemingly simple problem would be greatly appreciated.