"Code is not a valid class" when Pasting image on to Project folder - JavaFX using NetBeans

460 Views Asked by At

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.

1

There are 1 best solutions below

0
Alex Monroe On

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.