Saturday, March 20, 2010

Having used Macs for a number of years, I've become accustomed to being able to drag windows around by the window's outer most frame (the toolbar, statusbar or the outer border of the window). When I run a program that doesn't have this behavior (even one of my own), it almost feels broken.

I put together a piece of code which adds a MouseListener to any Swing component so dragging it will drag the entire Frame (or Dialog). Here's the behavior I'm trying to reproduce:

It isn't too difficult to implement. You can try out the results here:

The source is available on github.


Subscribe to Post Comments [Atom]

<< Home