简体   繁体   English

如何将JOption弹出窗口置于最前面?

[英]How to bring JOption pop up window to front?

I am working on my first project and it requires a JOption window to open for user input. 我正在做我的第一个项目,它需要打开JOption窗口以供用户输入。 it works but the window is behind everything else so I have to minimize the editor to input the info. 它可以工作,但窗口位于其他所有东西的后面,因此我必须最小化编辑器以输入信息。 How do I bring the window to the top? 如何将窗口移至顶部?

I've never seen this behaviour. 我从未见过这种行为。 The only thing I can think of is to make sure you specifify the "owner" frame when you show the option pane. 我唯一想到的是,确保在显示选项窗格时指定“所有者”框架。

Read the JOptionPane API and follow the link to the Swing tutorial on "How to Make Dialogs" for working examples. 阅读JOptionPane API,并通过链接到Swing教程“如何制作对话框”中的链接获取工作示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM