Best practice for drag and drop shapes
I'm looking at creating a (simple) gui that allows users to highlight and drag connected shapes around a canvas - much like MS Visio or Rational Rose.
I'm fairly new to GUIs, but I would have thought that this was something that was fairly common. The only way I can see of doing it seems rather primitive, ie the Java 2D API using custom code for basically everything from drawing the shapes, to determining which shape should highlighted and moved.
Are there other ways of doing this? Is there a "best practice"?