JDK-4407753 : JMenu:Keyboard navigation not working in Windows releases.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: x86
  • Submitted: 2001-01-24
  • Updated: 2001-01-25
  • Resolved: 2001-01-24
Related Reports
Duplicate :  
Description
Steps to reproduce in Windows:
-----------------------------
1. Run the following program.
2. Click "Alt+A". It does not work at all.

In Solaris, it is slightly better. "Alt+A" takes the user to next level. But that is it. Nothing works beyond that.

Tried and found happening in Windows2000, Windows98 and Solaris2.6.

Code used:
---------
import javax.swing.*;
import java.awt.event.*;

public class testMenu extends JFrame {
  public testMenu() {
    JMenuBar menuBar;
    JMenu menu, subMenu;
    JMenuItem menuItem;
    
    menuBar = new JMenuBar();
    setJMenuBar(menuBar);
    
    menu = new JMenu("First");
    menu.setMnemonic(KeyEvent.VK_F);
    menuBar.add(menu);
    
    menuItem = new JMenuItem("One", KeyEvent.VK_O);
    menu.add(menuItem);
    
    menu.addSeparator();
    subMenu = new JMenu("Subway");
    subMenu.setMnemonic(KeyEvent.VK_S);
    
    menuItem = new JMenuItem("Within subway", KeyEvent.VK_W);    
    subMenu.add(menuItem);
    menu.add(subMenu);
  }
  
  public static void main(String args[]) {
    testMenu frame = new testMenu();
    
    frame.setTitle("testMenu");
    frame.pack();
    frame.setVisible(true);
  }
}

Comments
EVALUATION This seems to be a bug as a result of the focus manager work that had been put into b35. This is not a problem with the menus. See bug 4389332 for details. mark.davidson@Eng 2001-01-24
24-01-2001