I assume that you and your freind are using 2 different versions of Java. your props are filled with a negative value, and your freind is not. (or even sdk vs jre).
what shows is that you have to write it in a different way for your applet to work on all versions.
Why not just move x -5?
if you want to do it in a more neat way
public void myfillRect(graphics page, int x, int y, int width, int height){
if(width <0)
x-=Math.abs(width);
if(height <0)
y-=Math.abs(height);
page.rectfill(x,y,Math.abs(width), Math.abs(height));
}
source
share