Where is the actual menu key processing in Swing or the LaF?
When there are two menus with two entries each (no
sub-menus) and one menu is visible and the right-arrow
(right-cursor) key is being pressed, the next menu will be
opened. But (even using the Windows LaF) the first entry of
the menu just opened will /not/ be selected, while I want in
/to be/ selected.
So, I got the idea that I might overwrite some Swing class
or or some such. But where in Swing or in the LaF is this
actually implemented that the right-arrow key does close the
current menu and does open the next menu (in the case
described above)?
I have been looking in JMenu.java, JMenuItem.java and some
of the LaF-specific classes, but was not able to find that
spot. One gets lost in many delegations. One class delegates
to the other, but I do not find the spot where the actual
connection of right-arrow to next-menu operation is done.
----------------------------------------
File Edit
> New
Open ...
Save
Save As ...
Exit
Above, ?New? is selected. Now, assume that the user pressed
[-->], then I want to see
----------------------------------------
File Edit
> Undo
Redo
Cut
Copy
Paste
with ?Undo? selected. But instead, all I get is:
----------------------------------------
File Edit
Undo
Redo
Cut
Copy
Paste
with ?Undo? /not/ selected. (One can select this
with the down-arrow key, then.)