public boolean contains(double x, double y){ double x0 = getX(); double y0 = getY(); return x >= x0 && y >= y0 && x < x0 + getWidth() && y < y0 + getHeight();}