When I tried to to create an image I was using this line but got no images, just blank lines.
g.drawImage(getImage(getDocumentBase(), "Piece_1.png"),coorx,
coory, SIZE_Y / 8, SIZE_Y / 8, this);
How do you display an image and where do you put it in an eclipse project?
Eclipse IDE executes the programs from the
srcdirectory. These steps solved me this problem.resources. You can name it whatever you want.Now first load your image before drawing it.
An Example
The constructor you can have.
Hope this solves your problem.