0

I am new to JavaFX, I am trying to simply put an image on the stage. However, when I copy and paste it to a separate folder under the source packages, I seem to be getting the error window saying: "code is not a valid class".

I don't know exactly what I could be doing wrong but I suspect it might be how I had set up the properties of the project. There is limited information online regarding this error.

  • I found out what I was doing wrong. I created a new folder from the files window and it worked here. I am still curious why this may have happened, something I also did before was create the ImageView object... Does that mean I always have to make this object before bringing the image over? – Sara Suarez Jan 30 '22 at 00:56

1 Answers1

0

It happened the same to me, I solved the problem by creating a new project and apparently in my previous project I accidentally erased a folder that I thought it wasn't necessary but, that created the error. Maybe you erased a folder? I hope I was helpful.