views:

625

answers:

2

I'd like to adapt/customize the appearance of my JMenuBar, so i do a little research. Now i wondering why there are so little information about this issue?!

I just found one good source here: http://forums.sun.com thread.jspa?messageID=4457769#4457769 which allows me to use a BackgroundImage for the MenuBar. The drawback is that i have to create such things like rollover effect (highlight BackgroundColor of JMenuItems), calculation of the jmenu positions by myself.

Did anyone of you knows a better, easier way to approach my goal? All i'd like to do is to customize the background of the JMenuBar by displaying a image instead of a plain color. Further the rollover-Effekts and the normal behaviour of a menu should be obtained.

A: 

here is another thread in the sun forums that show something similar to what you are trying: the developer overrides the paintComponent() method on the JMenuBar to draw an image.

akf
A: 

yes thanks, it's the same post i was talking about. I just tried to point to the fith post which obviously didn't work as i expected. So thanks for the correct link. But the solution as i mentioned has its drawbacks and has to be adopted (rollover effects, positioning, ...).