对了,我的项目是NetBeans的项目

解决方案 »

  1.   

    GraphicsEnvironment ge = GraphicsEnvironment  
                    .getLocalGraphicsEnvironment();  
            GraphicsDevice gd = ge.getDefaultScreenDevice();  
            if (gd.isFullScreenSupported()) {  
                try {  
                    gd.setFullScreenWindow(dialog);  
                } finally {  
                    gd.setFullScreenWindow(null);  
                    dialog.dispose();  
                    if (parent != null) {  
                        sourcePanel.setSize(size);  
                        parent.add(sourcePanel);  
                    }  
                }  
            }  
      

  2.   

    很久以前,我写过这样的一篇博文:
    http://blog.csdn.net/jia20003/article/details/6221934
      

  3.   

    xp + JDK1.7 +netbeans7.4 测试全屏挺正常的。就是变回小屏的时候,刷新有点问题。显示不正常。没有发现黑屏。
      

  4.   

    我的是Win7,难道和这个有关系?? 不可能吧...
      

  5.   


    看了你的文章了    public FullScreenViewer(JPanel sourcePanel) {  
            this.sourcePanel = sourcePanel;  
            initComponents();  
        }这里面的 sourcePanel 是什么意思? 为什么要在构造里面传这么一个参数?
    这个有什么作用?
      

  6.   

    sourcePanel - 就是你想要全屏的那个JPanel组件