This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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: 38519
    
  23
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to set background of SWT MenuBar