File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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: 39395
    
  28
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