示例#1
0
 public void setwnd() {
   GraphicsDevice dev = getGraphicsConfiguration().getDevice();
   if (prefs == null) return;
   try {
     dev.setDisplayMode(prefs);
     dev.setFullScreenWindow(null);
     setVisible(false);
     dispose();
     setUndecorated(false);
     setVisible(true);
   } catch (Exception e) {
     throw (new RuntimeException(e));
   }
   prefs = null;
 }
示例#2
0
 public void setfs() {
   GraphicsDevice dev = getGraphicsConfiguration().getDevice();
   if (prefs != null) return;
   prefs = dev.getDisplayMode();
   try {
     setVisible(false);
     dispose();
     setUndecorated(true);
     setVisible(true);
     dev.setFullScreenWindow(this);
     dev.setDisplayMode(fsmode);
     pack();
   } catch (Exception e) {
     throw (new RuntimeException(e));
   }
 }