title: Rotate rectangle on an Image Swing
body: <p>I have an Image on a JPanel.  I'm then drawing a rectangle on top of the image like this:</p>
  
  <pre><code>Graphics2D image = (Graphics2D) g;
  image.drawRect(......);
  //create image code here.
  image.rotate(1.5);
  image.drawImage(....);
  </code></pre>
  
  <p>Problem is that when I rotate the image  image.rotate(1.5), the rectangles stay in the same place.</p>
  
  <p>I've tried creating the rectangle before rotating the image and after rotating the image, but both times it fails.</p>
  
  <p>Is there an easy way to make the rectangles also rotate along with the image?</p>
  
  <p>Thanks.</p>