How can invalidate focus from parent frame? I have a JFrame (parentFrame), and I am opening a JDialog as:
JDialog dialog = new JDialog(parentFrame);
Now I need to set the dialog is such a way that, whenever trying someone click the parent frame it always put focus on that dialog, even resist the parent frame to be closed.
As an example, while you are adding an Environmental Variable in Windows (System Properties->Advanced Tab->Environmental Variables button click), the Environmental Variable window resist its parent to be close.
Make the dialog modal.