while using g.drawImage(img,0,0,100,100,0,0,0,0,null) it does not produce any result. So how to draw on the image in file of a better way?
while using g.drawImage(img,0,0,100,100,0,0,0,0,null) it does not produce any result. So how to draw on
Share
As well as ensuring the image is loaded, the last 4 int parameters are the source x,y,width,height… in specifying 0,0,0,0 you are asking the API to draw a 0x0 rectangle of the image starting at 0,0 – this should paint nothing. You probably wanting 0,0,100,100 for these, or use the overload that does not specify two sets of coordinates.