Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JPopupMenus don't highlight selected menu items



Hi Rib,

Subclassing of concrete UI classes does not work well. I've found that these
classes often declare too much variables and methods as private.

I copied the code for my MenuItemUI from the source of MetalMenuItemUI,
which is a subclass of BasicMenuItemUI.

The advantage of this approach is, that I can use it to fix problems in JDK
1.3.1 as well. Apart from fixing the problem with the highlighting I also
fixed the font of the accelerator text (which was wrong in 1.3.1 and was off
by 1 pixel from the regular menu text), and I also made the menu render the
accelerator using the proper Macintosh symbols (Place of interest sign
instead of "Meta", Option symbol instead of "Alt", and so on.).

Contact me if you want these classes.

-Werner

Rib Rdb wrote:
> [...]
> Is there a way to extend AquaMenuItemUI? I think I've
> figured out how to make it work if I can, but whenever
> I instantiate on object of my class I get an
> IllegalAccessException like this: [...]
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: JPopupMenus don't highlight selected menu items (From: Rib Rdb <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.