Java全屏独家模式

我使我的应用程序在独占模式下全屏显示,但是当我显示输入对话框时,应用程序被最小化。 我希望应用程序保持全屏,并在其上显示输入对话框。

这就是我全屏渲染应用程序的方法:

setUndecorated(true); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); gs.setFullScreenWindow(this); validate(); 

编辑:

这是我打开对话框的方式:

 JOptionPane.showMessageDialog(StartingPoint.this,txt, "You are on: " + planet, JOptionPane.INFORMATION_MESSAGE, icon); 

 but when I show an input dialog the application is minimized 

1)我无法模拟这个问题,如果没有为全屏应用程序添加额外代码图标 ,则无法进行模拟

2)请检查有关AWT / Swing的编程提示

3) input dialog setParent (不可能是JFrame

4)检查是否存在多个具有setModal / ModalityTypes的 顶级容器