开发者

How to bring JDialog to the top [duplicate]

This question already has answers here: Closed 9 years ago.

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.


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜