开发者

can I make JDialog to be modal using native system window as a parent?

开发者 https://www.devze.com 2023-03-25 10:28 出处:网络
I have a JDialog window. I need to make it modal, but the parent is not Java window, but nat开发者_JS百科ive Windows OS window.

I have a JDialog window. I need to make it modal, but the parent is not Java window, but nat开发者_JS百科ive Windows OS window. Is it possible?


No, you can't. You cannot even achieve reference not only to native windows but even to windows created by java application running in other JVM.

But you can create dummy window (Window, not Frame or JFrame), set its size as 0 and use it as an parent to any dialog. I do not know what is your concrete problem but sometimes the way I mentioned may help.

0

精彩评论

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

关注公众号