Results 1 to 4 of 4
  1. #1
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default 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. :P
    Get in the habit of using standard Java naming conventions!

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    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.

  3. #3
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default

    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!

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,301
    Rep Power
    20

    Default

    To get better help sooner, post a SSCCE that clearly demonstrates your problem.

    db

Similar Threads

  1. override the menu items
    By trishtren in forum AWT / Swing
    Replies: 0
    Last Post: 05-19-2011, 11:46 PM
  2. ActionListener for Menu Items
    By CuddlyKittens11 in forum AWT / Swing
    Replies: 7
    Last Post: 04-22-2011, 06:10 AM
  3. Replies: 5
    Last Post: 02-07-2010, 09:05 PM
  4. customizing menus
    By rotte001 in forum Eclipse
    Replies: 0
    Last Post: 02-06-2010, 07:04 PM
  5. hyperlinks from menu items?
    By asterope118 in forum New To Java
    Replies: 1
    Last Post: 07-16-2007, 01:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •