You know, I never considered this particular problem at all, but now that I do, I have a question myself!
zparticle,
In your code, doesn’t this mean that if the mouse moves at ALL in the components space, the image moves also? I wonder if it shouldn’t be checking for mouseClick to enable a value… or is there a mouseDrag event? No, don’t answer that, lest swpalmer hit me with the “read the docs” line which I’m going to do anyway! I was just thinking out loud.
[EDIT: yes, it’s called mouseDragged() and it checks for left-button held down, as i see it.]
However, this only works, as I see it, inside A component… what about intercomponent? Say I wanted to make a map editor (obvious applcation) with a terrain toolbar at the right, where I’d drag terrains onto a grid in the main panel… what would you suggest there?