-
Bug
-
Resolution: Unresolved
-
P4
-
6u23, 8, 9
-
x86
-
windows_vista
FULL PRODUCT VERSION :
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7600]
A DESCRIPTION OF THE PROBLEM :
I'm able to use fullscreen exclusive mode with normal Swing components, but for some reason when I use AWT components I only see a black screen in fullscreen mode. Under Windows7, if I switch away from the window (ALT-TAB) I see that the window preview/thumbnail renders correctly. Upon switching back into the application I get a black screen again.
If I run the same testcase with -Dsun.java2d.d3d=false the screen renders correctly. This problem is 100% reproducible.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the testcase.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The screen should display a small red box in the top left corner. The remaining surface should be rendered blue.
ACTUAL -
Black screen.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Canvas;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;
public class TestMain
{
public static void main(String[] arg)
{
EventQueue.invokeLater(new Runnable()
{
@Override
public void run()
{
final GraphicsDevice screen = GraphicsEnvironment.getLocalGraphicsEnvironment().
getDefaultScreenDevice();
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.getContentPane().setBackground(Color.BLUE);
frame.getContentPane().setLayout(null);
frame.setUndecorated(true);
Canvas canvas = new Canvas();
canvas.setBackground(Color.RED);
canvas.setBounds(10, 10, 100, 100);
frame.getContentPane().add(canvas);
System.out.println("isFullscreenSupported=" + screen.isFullScreenSupported());
screen.setFullScreenWindow(frame);
}
});
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Disable the Direct3d pipeline using -Dsun.java2d.d3d=false
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7600]
A DESCRIPTION OF THE PROBLEM :
I'm able to use fullscreen exclusive mode with normal Swing components, but for some reason when I use AWT components I only see a black screen in fullscreen mode. Under Windows7, if I switch away from the window (ALT-TAB) I see that the window preview/thumbnail renders correctly. Upon switching back into the application I get a black screen again.
If I run the same testcase with -Dsun.java2d.d3d=false the screen renders correctly. This problem is 100% reproducible.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the testcase.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The screen should display a small red box in the top left corner. The remaining surface should be rendered blue.
ACTUAL -
Black screen.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Canvas;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;
public class TestMain
{
public static void main(String[] arg)
{
EventQueue.invokeLater(new Runnable()
{
@Override
public void run()
{
final GraphicsDevice screen = GraphicsEnvironment.getLocalGraphicsEnvironment().
getDefaultScreenDevice();
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.getContentPane().setBackground(Color.BLUE);
frame.getContentPane().setLayout(null);
frame.setUndecorated(true);
Canvas canvas = new Canvas();
canvas.setBackground(Color.RED);
canvas.setBounds(10, 10, 100, 100);
frame.getContentPane().add(canvas);
System.out.println("isFullscreenSupported=" + screen.isFullScreenSupported());
screen.setFullScreenWindow(frame);
}
});
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Disable the Direct3d pipeline using -Dsun.java2d.d3d=false