我尝试100%全屏模式,我使用Ubuntu 12.10,左边是侧栏,顶部是菜单。当我运行全屏模式时,它不会掩盖这两个菜单栏,它就在它们旁边:
它应该覆盖左侧菜单栏和顶部黑条。为什么不呢?
package sscce;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;
public class Main extends JFrame{
public Main(){
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice myDevice = ge.getDefaultScreenDevice();
this.setUndecorated(true);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
myDevice.setFullScreenWindow(this);
}
public static void main(String[] args){
Main main = new Main();
}
}