Java全屏独家模式 [英] Java full screen exclusive mode
问题描述
我让我的应用程序在独占模式下全屏显示,但是当我显示输入对话框时,应用程序被最小化。我希望应用程序保持全屏显示,输入对话框将显示在屏幕上。
这是我将应用程序全屏显示的方式:
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,图标);
我显示一个输入对话框应用程序被最小化
<1>我不能模拟这个问题并且模拟没有额外的代码是不可能的 iconofied 用于完整 - 屏幕应用程序
2)请检查关于AWT / Swing的编程技巧
<3> setParent
对于输入对话框
<> $
JFrame
4)检查是否不存在多于一个顶级容器,并带有 setModal / ModalityTypes I made my application to be full screen in exclusive mode but when I show an input dialog the application is minimized. I want the application to stay full screen and the input dialog to be show over it.
This is how I render my application full screen:
setUndecorated(true);
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gs = ge.getDefaultScreenDevice();
gs.setFullScreenWindow(this);
validate();
Edit:
This is how I open the dialog:
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) I can't to simulating this issue and simly isn't possible without additional code iconofied for Full-Screen Application
2) please to check Programming Tips about AWT/Swing
3) setParent
(not possible corectly for JFrame
) for input dialog
4) to check if isn't there more than one Top-level Container with setModal / ModalityTypes
这篇关于Java全屏独家模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!