title: Moving and Rotating an image simultaneously with AffineTransform
body: <p>I am coding a simple shooter game whereby i want to rotate my character to the direction of the mouse and "fire". I have done all the code for this except rotating the actual image. Here is some of my code so far: (THIS IS ALL UNDER THE PAINT COMPONENT METHOD)</p>
  
  <pre><code>   xCent = x + 50;
      yCent = y + 50; // x and y center of image ( x and y change depending on Keyboard Input)       
      a.setToRotation(theta, xCent,yCent); // a = new AffineTransform()    Here is my calculation of theta (under the MouseMotionListener):  theta = Math.atan2(e.getY() - yCent,e.getX() - xCent);
      a.setToTranslation(x,y);
      a.setToRotation(theta, xCent,yCent);
      g2.drawImage(charac,a, null);
  </code></pre>
  
  <p>How do i go about now "setting" the x and y coordinates of the image for the Graphics2D object to draw it??</p>