if (upperLeft[0] + oldRectangle.width > getX() + getWidth()) { upperLeft[0] = getX() + getWidth() - oldRectangle.width;
if (upperLeft[0] + oldRectangle.width >= getX() + getWidth()) { upperLeft[0] = getX() + getWidth() - oldRectangle.width - 1; }  if (upperLeft[1] + oldRectangle.height >= getY() + getHeight()) { upperLeft[1] = getY() + getHeight() - oldRectangle.height - 1;
	protected int [] getUpperLeftPointsFromCenter(int centerX, int centerY) {		int [] upperLeft = new int[2];		Rectangle oldRectangle = getViewRectangle();		upperLeft[0] = centerX - oldRectangle.width/2;		upperLeft[1] = centerY - oldRectangle.height/2;        /*         * JP, 25-May-03: Avoid positioning of the rectangle outside the         * available area. Resulted in very strange artifacts on the screen.         */        if (upperLeft[0] + oldRectangle.width > getX() + getWidth()) {            upperLeft[0] = getX() + getWidth() - oldRectangle.width;        }        if (upperLeft[1] + oldRectangle.height > getY() + getHeight()) {            upperLeft[1] = getY() + getHeight() - oldRectangle.height;        }        		return upperLeft;	}