public void move () {
      // instead of += dx or += dy in C
      x += 10*dx;
      if (x + width > window.width) {
        x = window.width - width;
        dx = -dx;
      } else if (x < 0) {
        x = -x;
        dx = -dx;
      }

      y += 10*dy;
      if (y + height > window.height) {
        y = window.height - height;
        dy = -dy;
      } else if (y < 0) {
        y = -y;
        dy = -dy;
      }

      render.composite (Render.OVER, picture, Picture.NONE,
        back_buffer_picture, 0, 0, 0, 0, (int) x, (int) y, width, height);
    }