public void setX(int x) {
        if (this.x != x) {
            if (group != null) {
                int width = (int)bounds.getWidth();
                int height = (int)bounds.getHeight();
                int bx = (int)bounds.getX();
                int by = (int)bounds.getY();
                group.damage(new BoundaryRectangle(this.x + bx, y + by,
                        width, height));
                group.damage(new BoundaryRectangle(x + bx, y + by, 
                        width, height));
            }
            this.x = x;
            if (group != null) {
                group.resizeChild(this);
            }
        }
    }