title: Draggable rectangles in Java 2D
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/13220971/how-to-drag-object">how to drag object</a>  </p>
  </blockquote>
  
  
  
  <p>I need to draw some UML components (classes, packages etc) using Java 2D and then be able to drag them around. Is there a way to do this? I mean, to make a shape "draggable"?</p>