I am following the zetcode Snake java games tutorial and always get this error:
ImageIcon iid = new ImageIcon(this.getClass().getResource(\"ball.png\")); bal
Try using System.out.println(System.getProperty("java.class.path")); to find out location of your .class file and place the images in this folder.
System.out.println(System.getProperty("java.class.path"));