wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes how to set background of SWT MenuBar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to set background of SWT MenuBar" Watch "how to set background of SWT MenuBar" New topic
Author

how to set background of SWT MenuBar

Nrapendra Sharma
Ranch Hand

Joined: Jun 16, 2008
Posts: 31
Hello everyone ,
Can anyone tell me how can i set background color of a menu Bar (in SWT)
I cant find setBackground method in Menu class...

Regards,
Nrapendra


Regards,
Nrapendra Sharma
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38045
    
  22
It's there in JMenuBar because it inherits from JComponent which has a setBackground method, but doesn't appear to be there in MenuBar, presumably because AWT components use the system look-and-feel.
Nrapendra Sharma
Ranch Hand

Joined: Jun 16, 2008
Posts: 31
SWT inherit the native look and feel... may be thats why ..
....i want to knw is there any way i can override the default look and feel of menu bar(mainly background color)

Regards,
Nrapendra
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to set background of SWT MenuBar
 
Similar Threads
icefaces menubar css
Windows in SWT
Change menu and tooltiptext fonts with SWT
awt
SWT label Background transparent