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?
Maybe something to this degree except in applet form: Rotate a Java Graphics2D Rectangle?