Ok first post so be gentle

My app can be run in full screen mode or in windowed mode. The structure of it is a Frame with a MenuBar and a Panel added to it respectfully. I use Active Rendering using a bufferStrategy. I display the game info on the Panel, and I display my graphics in the frame (I used to have it displayed in another Panel but once I switched to a bufferStrategy that did not work). Ok so in windowed mode everything works fine, but when I put the app into Full Screen mode things start to go bad. First of all the Panel that I display my game info on starts to flicker, and the menubar disappears completely. I solved the Panel flickering problem by calling frame.paintAll() in my rendering loop, that "seemed" to fix that problem but my MenuBar is still not showing. I know it is there because I can sort of clik on it but then it quickly disappears.
My app used to be a JFrame with a JPanel and a JMenuBar but in windowed mode the JmenuBar's children would get hidden by my frame, so I changed everything to AWT and that "solved" the problem.
here is the rendering code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| public void update() { Dimension d = (new Dime(GAMEWIDTH,GAMEHEIGHT)); if( !bufferStrategy.contentsLost() ) { Graphics g = bufferStrategy.getDrawGraphics(); if( fs ){ frame.paintAll(g); g.setColor( Color.black ); g.fillRect( 0, 19, d.width-1, d.height+23 ); } else{ g.setColor( Color.black ); g.fillRect( 0, 41, d.width-1, d.height ); g.setColor( Color.lightGray ); g.fillRect( d.width-1, 41, d.width, d.height ); } . . . . |
Any help? anyone encounter this problem before with the MenuBar disappearing?
Thanks for your time
Peppi