Thanks for the reply, Janak. Unfortunately, this doesn't provide me with any information that I can use to resolve this issue. 
 
Allow me to re-phrase the problem:
 
1) I create an action and set both the mnemonic and shortcut.
2) I create a ULCMenuItem using this action.
3) I create a ULCButton using this same action, which I add to a ULCToolBar.
 
Now, when I run the program, I see that the menuitem is correctly showing information from the action. Alas, the tooltip that is being displayed on the toolbar's button is incorrect. The end of the tooltip shows a key combination that wasn't defined in the action. Further, this bogus shortcut key actualy works.
 
I don't set any Look&Feel, but when I perform the exact same logic (but replacing ULC with J classes) the Swing program runs as expected. That is, the bogus key shortcut is neither displayed nor working.
 
In conclusion, there is a difference in behavior between Swing and ULC that appears to point to a bug in ULC implementation. Can you please run this example and verify that you do see the same problem. Any help you can give that would prevent this from happening in my application would be a great help.
 
Thanks.
-Stuart Booth (Abacus Research)
 
 
-----Original Message-----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [email protected]
Sent: Wed, 16 Aug 2006 9:41 AM
Subject: RE: [ULC-developer] Bug using Actions ?

Hi Stuart,

In Swing, Accelerator can only be set on JMenuItem and not on JMenu or
JButton etc.

So the IAction.ACCELERATOR_KEY property of Action will be used by only those
components which allow setAccelerator.

ULC's behavior is that provided by Swing.

The ToolTip text (i.e. whether to show acceleartor key on tooltip in
addition to the message) is determined by the LookAndFeel class such as
MetalToolTipUI etc.

Thanks and regards,

Janak


Check out AOL.com today. Breaking news, video search, pictures, email and IM. All on demand. Always Free.

Reply via email to