Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So here my own anwser to my own problem, the workaround I finally use and I think is the only not so ugly workaround I can found is to use this code</p> <pre><code>private void jmiFullscreenActionPerformed(java.awt.event.ActionEvent evt) { GraphicsDevice gd = this.gameFrame.getGraphicsConfiguration().getDevice(); if (!this.gameFrame.isResizable() ) { //gd.setFullScreenWindow(null); this.gameFrame.setResizable(true); this.gameFrame.setPreferredSize(new Dimension(400, 300)); } else { this.gameFrame.setResizable(false); this.gameFrame.setPreferredSize(new Dimension(gd.getDefaultConfiguration().getBounds().getSize())); this.gameFrame.setExtendedState(Frame.MAXIMIZED_BOTH); } refresh(); } </code></pre> <p>instead of this in my original example</p> <pre><code>private void jmiFullscreenActionPerformed(java.awt.event.ActionEvent evt) { GraphicsDevice gd = this.gameFrame.getGraphicsConfiguration().getDevice(); if (gd.getFullScreenWindow() != null) { gd.setFullScreenWindow(null); this.gameFrame.setResizable(true); this.gameFrame.setPreferredSize(new Dimension(400, 300)); } else { this.gameFrame.setResizable(false); this.gameFrame.setPreferredSize(new Dimension(gd.getDefaultConfiguration().getBounds().getSize())); this.gameFrame.enableInputMethods(false); gd.setFullScreenWindow(this.gameFrame); } refresh(); } </code></pre> <p>So finally I'm not using the java fullscreen function and I just use some properties of my jframe to make it look like a fullscreen frame.</p> <p>Hope it help some of you !! have a nice day</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload