Results 1 to 4 of 4
- 08-01-2011, 02:56 AM #1
Customizing appearance of disabled menus and menu items
My app is using the system look and feel, but disabled menu items don't look like they do in native apps... or in Eclipse, for that matter. Instead of being gray, they actually look bolder. Closer inspection reveals that they're being displayed in white text (the same as enabled items) with a white "drop shadow" slightly offset.
How can I make them gray? I'm looking at UIManager.getLookAndFeel() and UIManager.getLookAndFeelDefaults(), but I don't know where to go from there.
Edit: when I use the default Java look and feel, enabled text is black, and disabled text is gray as expected. But then my app looks ugly. :PGet in the habit of using standard Java naming conventions!
Have you looked at Rob Camick's (java-forums member name camickr) blog on this: UI Manger Defaults? If not, please check it out as it may very well answer your question for you.
- 08-01-2011, 04:09 AM #3
I hadn't seen that page, but I found some others containing the same information. I experimented more and discovered that I can't change anything about my app's look and feel. Even basic options, like those on this page, have no effect. I tried it with both the system look and feel, and the default look and feel. My changes to the L&F are made before any components are instantiated.
I wonder if this is some weird OpenJDK thing.Get in the habit of using standard Java naming conventions!
- 08-02-2011, 08:11 AM #4
- By trishtren in forum AWT / SwingReplies: 0Last Post: 05-20-2011, 12:46 AM
- By CuddlyKittens11 in forum AWT / SwingReplies: 7Last Post: 04-22-2011, 07:10 AM
- By Razel in forum New To JavaReplies: 5Last Post: 02-07-2010, 10:05 PM
- By rotte001 in forum EclipseReplies: 0Last Post: 02-06-2010, 08:04 PM
- By asterope118 in forum New To JavaReplies: 1Last Post: 07-16-2007, 02:49 PM