1

Possible Duplicate:
Howto bring a Java window to the front?

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.

Community
  • 1
  • 1
Sunil Kumar Sahoo
  • 53,011
  • 55
  • 178
  • 243
  • This might be your solution: [howto-bring-a-java-window-to-the-front](http://stackoverflow.com/questions/309023/howto-bring-a-java-window-to-the-front)? – dacwe Jun 04 '10 at 06:29

2 Answers2

1

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

Rhangaun
  • 1,430
  • 2
  • 15
  • 34
0

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

Sunil Kumar Sahoo
  • 53,011
  • 55
  • 178
  • 243