• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
Rancher
Posts: 3051
22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be Forthright When Cross Posting To Other Sites

Also posted in the Sun forums.
 
Michael Martin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(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.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!