Mailing Lists: Apple Mailing Lists

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

Changing menu shortcuts



I have a Swing application that uses a JMenuBar and set apple.laf.useScreenMenuBar so it appears in the Mac menu bar. Depending on context (which panels are shown etc.) I need to modify the menu, including reassigning keyboard shortcuts from an item in one menu to another using JMenuItem.setAccelerator().

This all works, nearly, except for a refresh problem. If I go to the new menu the shortcut isn't shown unless I go to the old menu which used to have that shortcut first. Is there any way to force it to rebuild the Mac menu bar to resync it with the JMenuBar? (I already tried setting the menu bar to null and then resetting the actual menu bar, to no avail.)

-Rolf
--
Rolf Howarth
Square Box Systems Ltd
Warwick, UK.
http://www.squarebox.co.uk
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to 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.