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 this:
ImageIcon iid = new ImageIcon(this.getClass() .getClassLoader().getResource("ball.png")); ball = iid.getImage();
Make sure image is in the same folder as java file.