This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NB4.1 (200503241924)
Window main menu
Jindra, Dusan. Could you please help with resolving this mnemonics conflict? Thanks.
All possible letters, which can be used as a mnemonic for Navigator, have been already used. First pressing of N letter selects "Navigator", the second selects "Select Documents In". I think the cycle is OK. Dusan, what do you think about that?
sorry, Jindro. Mnemonic keys don't work like this. when you press Alt-N, you don't select the item, you choose it. meaning it will trigger the action. You cannot create cycles for mnemonics. One has to pick a different one or avoid mnemonics for some items.
I tried to create JFrame with JMenubar with two items with the same mnemonic .... and I didn't believe it, it really works. If you try it and if you press the mnemonic first time it just selects first menu item, if you press mnemonic second time it selects the second one. To performance action you have to press Enter ! But if you have two menuitems with different mnemonics and you press one - action is performed. I know that in our menubar it works differently, if you press mnemonic action is performed - so if you have two items with the same mnemonic. So I think here two questions arises : 1. for HIE : Do we really want to have more than one menuitem with the same mnemonic in menu ? 2. for DEV: Why it works differently against simple JFrame (described above) ?
marian, you use 1.5 jdk?
Yes , I am using JDK1.5.0_02 (fcs) on Linux RH 9/Gnome .
can you attach the application? I will try on mac+1.4
On Windows XP with JDK 1.5_01 in NetBeans it works for me in same way as marian described. I do not have any problems with that. The problem with mnemonic is, that almost every letter is used, so it is really hard to choose some. I think we should discuss it on HIE's meeting.
Presumably supported in JDK since 1.4.1. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4515762
According the link, which was posted by Honza, I think we should support it.
Created attachment 21246 [details] JFrame with menubar with two items with identical mnemonics
confirmed, seems to work in the swing app on mac as well as described. I was wrong.
reassigning to dafe, I don't have a working Windows development environment.
I've verified that Swing handles duplicate mnemonics fine. After the Window menu is invoked via Alt-W, the user can cycle the selection between the Navigator and Select Document in items by pressing the 'N' key. Up to HIE to define whether duplicate mnemonics are acceptable, or find a new mnemonics for one of the menu items in question. Until then, there's nothing to be done from the engineering point of view.
jchalupa wrote : > I've verified that Swing handles duplicate mnemonics fine. After the Window menu > is invoked via Alt-W, the user can cycle the selection between the Navigator and > Select Document in items by pressing the 'N' key. Honza, it doesn't work in NB4.1(200504031800) , JDK1.5.0_02, Linux RH9 / Gnome !
Oh, doesn't it? Works for me fine on XP with JDK 1.4.2_06 and 1.5.0_01. What about the other issue #57080? Does it work on Gnome?
issue 57080 - it works fine (as you described)
*** Issue 58567 has been marked as a duplicate of this issue. ***
I discussed mnemonics duplicating with other HIEs and we all agreed on supporting them so I mark this issue as fixed.
verified
i add a mnemonic for two or more menuitems in layer.xml,but the mnemonic will only work for the last menuitem,it annoys me for long time,pleanse help me!!!
(In reply to comment #22) > i add a mnemonic for two or more menuitems in layer.xml,but the mnemonic will > only work for the last menuitem,it annoys me for long time,pleanse help me!!! File a new issue then.