-
jDialog box disappears
Hi,
I have a jDialog box which opens when I click a button.If I move away from the window and go to some other application(check email or something) and click again on my application,The dialog box doesnt appears and my application seems stuck.
Any pointers what is causing the issue.please help
Thanks
-
Make sure you specify the parent frame when you create the dialog. Otherwise the dialog may hide below other windows and it will not be brought into focus when you click on the application.
-
Thanks for the reply.I am pretty new to Swing,Can you help me how to set or specify the parent for the dialog box?
Thanks,
-
Sure. Read the JDialog API and look at the various constructors. The API actually refers to this parameter as the "owner" not the "parent".