I have a JDialog and I have it parented to a JFrame. I can move the dialog outside of the JFrame and I want to remove it.
Visual example of the Problem
What I want to happen: Fix
You can add a component listener to the JDialog to implement the componentMoved and componentResized event and when the bounds of the new position is outside your wanted bounds of the associated JFrame you can call the setBounds method to relocate the JDialog...7
Yes you can, please follow this instruction for futher information. Keep Coding! :)