[英]How to check jframe window opened .If jframe window opened than click outside then blinking jframe window in java
Allow Only One Jframe window if try to open other than blinking jframe window in java swing **如果在 java swing 中尝试打开闪烁的 jframe 窗口以外的其他窗口,则只允许一个 Jframe 窗口**
HOW如何
** **
I can only guess what your question is supposed to mean, but my best guess would be that you want to create a modal frame.我只能猜测你的问题应该是什么意思,但我最好的猜测是你想创建一个模态框架。
JFrame
doesn't support this type of frame. JFrame
不支持这种类型的框架。 You'll have to use JDialog
( http://docs.oracle.com/javase/7/docs/api/javax/swing/JDialog.html ) instead.您必须改用
JDialog
( http://docs.oracle.com/javase/7/docs/api/javax/swing/JDialog.html )。
JDialog dialog = new JDialog(parentFrame , "someTitle" , true);
... //create dialog
dialog.setVisible(true);
//now the parentFrame is blocked until the dialogwindow is closed
Allow Only One Jframe window if try to open other than blinking jframe window in java swing
如果在 java swing 中尝试打开闪烁的 jframe 窗口以外的其他窗口,则只允许一个 Jframe 窗口
don't to create more than one JFrame to use JDialog instead不要创建多个JFrame来使用JDialog
set JFrame as owner for the JDialog with setModal 使用 setModal将JFrame设置为 JDialog 的所有者
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.