I have to draw a rectangle so I do the next in the paint-method:
g.drawRect(x-s+1,y-arr, x+s-1,y);
A rectangle is drawn but it doesn't have the size I want, and I ask from it. I printed out the parameter and they are how they should be. When I use drawLine to draw the rectangle it's ok.
g.drawLine(x-s+1,y-arr,x-s+1,y);
g.drawLine(x+s-1,y-arr[i],x+s-1,y);
g.drawLine(x-s+1,y,x+s-1,y);
g.drawLine(x-s+1,y-arr[i],x+s-1,y-arr[i]);
I need the right parameters for my drawRect because I want to fill it too.
It's probably a stupid error but I can't see it because I'm looking at it for a while now. Can someone help?