Java full screen exclusive mode

2019-02-25 23:11发布

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条回答
你好瞎i
2楼-- · 2019-02-25 23:28
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

查看更多
登录 后发表回答