I'm following this tutorial for java swing games: http://zetcode.com/tutorials/javagamestutorial/movingsprites/
At this point:
ImageIcon ii = new ImageIcon(this.getClass().getResource());
image = ii.getImage();
I just don't know what kind of path I have to write and where should I save my images (which directory).
Would you help me please? Would you give an example?
In your src folder, create a folder called "images" or "files" then put the image in there.
Then use this:
ImageIcon(this.getClass().getResource("/images/filename.png"));
If that doesn't work, try this:
ImageIcon(this.getClass().getResource("images/filename.png"));