permaculture playing cards*
The moose likes Swing / AWT / SWT and the fly likes JMenuBar showing gradient background on Mac -- how to disable? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JMenuBar showing gradient background on Mac -- how to disable?" Watch "JMenuBar showing gradient background on Mac -- how to disable?" New topic
Author

JMenuBar showing gradient background on Mac -- how to disable?

Michael Martin
Greenhorn

Joined: Jul 10, 2009
Posts: 4
JMenuBar on Mac OS adds a gradient, which I don't want. See the simple example below. (Note, the gradient is very subtle. Using Mac OS's DigitalColorMeter utility, you can detect it.) Does anyone know how I can get rid of it. No matter what I set the background color to, it adds this subtle gradient on top of it. UIManager.get("MenuBar.gradient") returns null. Any ideas?

Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2090
    
    7
Be Forthright When Cross Posting To Other Sites

Also posted in the Sun forums.
Michael Martin
Greenhorn

Joined: Jul 10, 2009
Posts: 4
(Busted. Sorry, I'll be sure to say when I'm posting to more than one forum in the future.) I think the below example makes the issue a little clearer. If you add the JMenuBar to a JPanel, instead of using setJMenuBar on the JFrame, you can see the gradient clearer. Notice the top of the JMenuBar is lighter than the bottom. Is there a way to disable that? Thanks.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMenuBar showing gradient background on Mac -- how to disable?
 
Similar Threads
How to tidy up a swing listener program?
Things arn't showing up...
Class Communications
Resize problem with JMenuBar
Scrolling JMenu