removing Mac menu in java application

Discussion in 'Mac Programming' started by paul p, May 8, 2007.

  1. paul p macrumors newbie

    Joined:
    May 7, 2007
    #1
    I have developed a java application using an undecorated JFrame spanning two monitors. I've set the size of the Jframe to 2048x768, which occupies the complete area of the two monitors except for the mac menu bar at the top of the main monitor. How can I get rid of the menu bar while my application is runnning so I can use all the monitor space?

    paul p
     
  2. Allanist macrumors newbie

    Joined:
    Mar 18, 2007
    #3
    You may want to look java.awt.GraphicsEnvironment etc.
    Maybe something like:
    Code:
    GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(frame);
     
  3. paul p thread starter macrumors newbie

    Joined:
    May 7, 2007
    #4
    Thanks for the suggestions. :) However fullscreen exclusive mode is what I tried to use in the past but the Mac will not give me a 2048x768 in fullscreen mode and span over the two monitors. I could try and make the main display fullscreen at 1024x768 and the other an undecorated frame of 1024x768, but this is messy and I have aready developed the code for a an XP PC using fullscreen 2048x768 and it works fine. So I have opted for an undecorated frame of 2048x768 for the Mac, however I now need to get rid of the menu to have the full display over the two monitors.
     
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    I think you might have to bridge out to Cocoa to call the functions in CoreGraphics to remove the menu...
     
  5. paul p thread starter macrumors newbie

    Joined:
    May 7, 2007
    #6
    Thanks for the suggestion. I am heading done that road with JNI in mind.:)
     

Share This Page