Jframe + canvas in fullscreen mode [done]

Hello,

i dont no why but i cant show a jframe with canvas added in fullscreen mode.

without canvas its working.

code:

[java]

JFrame app = new JFrame();

app.setLayout(null);

app.setIgnoreRepaint( true );

app.setUndecorated( true );

// Create canvas for painting…

Canvas canvas = new Canvas();

canvas.setIgnoreRepaint( false );

canvas.setSize( 640, 480 );

canvas.setBackground(Color.red);

app.add( canvas );

// Add canvas to game window…

// Get graphics configuration…

GraphicsEnvironment ge =

GraphicsEnvironment.getLocalGraphicsEnvironment();

GraphicsDevice gd = ge.getDefaultScreenDevice();

GraphicsConfiguration gc = gd.getDefaultConfiguration();

// Change to full screen

gd.setFullScreenWindow( app );

if( gd.isDisplayChangeSupported() ) {

gd.setDisplayMode(

new DisplayMode( 640, 480, 32, DisplayMode.REFRESH_RATE_UNKNOWN )

);

}

[/java]

i’m not trying to be mean, but dude you ask way too many questions, 14 GUI threads in the last week. 76 forum topics with 166 posts ;o that balance just isn’t right.

Hi,

“i’m not trying to be mean, but dude you ask way too many questions, 14 GUI threads in the last week. 76 forum topics with 166 posts ;o that balance just isn’t right.”



Mr.Sir has been a member for 11 months, 3 weeks.



That was not helpful.

this seems only be under windows 7 (maybe vista also, but who wants to use it?)

found a thread were deactivating the direct 3d pipeline should work - and it worked.

starting vm with -Dsun.java2d.d3d=false