Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Can't Display MenuBar in Full Screen Mode  (Read 1424 times)
0 Members and 1 Guest are viewing this topic.
Offline Peppi

Junior Newbie

Java games rock!

« Posted 2003-03-03 18:27:18 »

Ok first post so be gentle  Wink
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
public void update() {
  Dimension d = (new Dime(GAMEWIDTH,GAMEHEIGHT));
    if( !bufferStrategy.contentsLost() ) {
      Graphics g = bufferStrategy.getDrawGraphics();
       if( fs ){  // if full screen
         // Clear the drawing buffer to black
         g.setColor( );                
         g.fillRect( 0, 19, d.width-1, d.height+23 );
         // Clear the drawing buffer to white
         g.setColor( );                
         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
Offline bedelf

Junior Devvie

Are you suggesting coconuts migrate?

« Reply #1 - Posted 2003-03-04 00:52:05 »

I can't say I really read your post but AWT/Swing stuff isn't really intended for fullscreen mode and if it works at all you should be surprised.

IMO game GUI is a big problem since you basically have to create it all yourself. So far as I've seen, no one has released anything like that publicly. The stuff I've seen has been extremely simple and wouldnt work all that great for any semi-complex game.

I dunno how to help you. :/
Pages: [1]
  ignore  |  Print  

EgonOlsen (78 views)
2018-06-10 19:43:48

EgonOlsen (58 views)
2018-06-10 19:43:44

EgonOlsen (78 views)
2018-06-10 19:43:20

DesertCoockie (260 views)
2018-05-13 18:23:11

nelsongames (158 views)
2018-04-24 18:15:36

nelsongames (157 views)
2018-04-24 18:14:32

ivj94 (898 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (811 views)
2018-03-24 14:43:53

Solater (175 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!