title: How do I rotate a shape in the direction of the mouse in a java applet?
body: <p>In my applet I have an object to make a rectangle anywhere on the screen. All I need is a way to be able to send in the coordinates of my mouse and then let the rectangle rotate and point in that direction. What is the best way to accomplish rotating an object such as a rectangle to my mouse at any given point?</p>
  
  <p>Maybe something to this degree except in applet form: <a href="https://stackoverflow.com/questions/7517688/rotate-a-java-graphics2d-rectangle">Rotate a Java Graphics2D Rectangle?</a></p>