Get JDialog Location After Mouse Drag

I thought using a MouseListener and MouseMotionListener would do the trick in getting a JDialog‘s new location after a mouse drag. Turns out using those Listeners will only affect the JDialog if the mouse drag happens within its content pane. The correct listener to use is ComponentListener and getting the value in the componentMoved() method.

Related Posts Plugin for WordPress, Blogger...

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *