Move multiple window together


I get an app with several DocumentWindow inside, emulating a little OS… where you can select all the window and move them from one as you move several directories or files in your OS GUI in the same time.

I just got the delta from the move of the one dragged window.
and apply it to the others, at each step.
Is there another way to do that ?
Something existant to manage it ?

Cause my solution work, if I introduce a kind of latency because the “::moved” callback would be called each pixel, so I would only can move vertically (Jules, I think you test first the Y, for the moving test).

Sorry for the bad explanation… ideas are welcomen.


You could also make one comp register itself as a ComponentListener of another one, so it can move itself whenever that other comp moves.