-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.4.0
-
x86
-
generic
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);
}
}
-----------------------------
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);
}
}
- duplicates
-
JDK-4389332 Focus owner is null for applications which have menus only.
- Resolved