views:

81

answers:

3

I have created a java application. Now I write that if the JDialog is not present then It will create another JDialog but If its present then i set it as setVisible as true. But the problem is that if JDialog is there and after that i opened other applications like internet explorer then my application is not shown on top. So i made setAlwaysOnTop as true so the main problem i faced is that if after my application if i open other applications then those applications always displayed in the backside of my application which is wrong also. I want if there is JDialog already present then bring to the top but not for always.

Thanks Sunil Kumar Sahoo

A: 

If you want to manage your windows according to external windows, sadly you'll have to resort to native calls (JNI, etc.).

Skeptic
+1  A: 

This might be your solution: howto-bring-a-java-window-to-the-front?

dacwe
A: 

Assign that JDialog to an object and dispose that JDialog then assign the object to the JDialog

Deepak