I have a JDialog box which requests the user for username and password. This JDialog is on top of a JFrame. My problem is if I go to resize the JFrame or click on it, it (the JDialog) disappears. Once I move the JFrame or close I realize the JDialog is under. How do I maintain the Jdialog on top. Please can someone help. I have tried using setNextFocusableComponent() and nothing seems to work.
JDialog - use this constructor public JDialog(Dialog owner, boolean modal) Creates a modal or non-modal dialog without a title and with the specified owner dialog. Parameters: owner - the Dialog from which the dialog is displayed modal - true for a modal dialog, false for one that allows others windows to be active at the same time hope this helps Durga
Originally posted by john mattucci: I have a JDialog box which requests the user for username and password. This JDialog is on top of a JFrame. My problem is if I go to resize the JFrame or click on it, it (the JDialog) disappears. Once I move the JFrame or close I realize the JDialog is under. How do I maintain the Jdialog on top. Please can someone help. I have tried using setNextFocusableComponent() and nothing seems to work.