Java full screen exclusive mode

浪尽此生 提交于 2019-12-04 04:58:19

问题


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);

回答1:


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



来源:https://stackoverflow.com/questions/9142300/java-full-screen-exclusive-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!