I need to add a custom handler for double-click on a JDialog's title bar. I need the component to be reactive only if user clicks twice on the title bar; the problem is I don't know how (and I did not find anything useful on the matter) access that part of the component. Can anyone suggest me how to achieve this ?
this works, but the 'JDialog.setDefaultLookAndFeelDecorated(true)' is a bit ugly
Joined: Jun 24, 2005
thank you so much for your reply and providing me a sample. In a nutshell, the part of the code that gives you a reference to JDialog's title is
Your code works, anyway there's another problem: I cannot drag dialog's window anymore. It seems "frozen". It's like if adding a MouseListener to d.getLayeredPane().getComponent(1) inhibits default drag handler...
Joined: Jun 09, 2003
it would probably consume the mouseEvent that would normally pass to the default listener handling the dragging.