-
Bug
-
Resolution: Fixed
-
P4
-
5.0, 6
-
b07
-
generic, x86
-
generic, windows_2000
-
Verified
Run the following test, press to the Menu and select the item
press escape button
Actual: The menu becames unselected
Expected: The menu is still selected
JDK 1.6
import javax.swing.*;
public class MenuTest {
public static void main(String[] args) throws Exception {
final JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JMenuBar bar = new JMenuBar();
JMenu menu = new JMenu("Menu");
menu.setMnemonic('m');
JMenuItem item = new JMenuItem("Item");
menu.add(item);
frame.setJMenuBar(bar);
bar.add(menu);
frame.setSize(200, 200);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
}
press escape button
Actual: The menu becames unselected
Expected: The menu is still selected
JDK 1.6
import javax.swing.*;
public class MenuTest {
public static void main(String[] args) throws Exception {
final JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JMenuBar bar = new JMenuBar();
JMenu menu = new JMenu("Menu");
menu.setMnemonic('m');
JMenuItem item = new JMenuItem("Item");
menu.add(item);
frame.setJMenuBar(bar);
bar.add(menu);
frame.setSize(200, 200);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
}
- duplicates
-
JDK-4919459 JMenu loosing focus on hitting ESC when its popup menu is visible
-
- Closed
-
-
JDK-2119920 JMenu loosing focus on hitting ESC when its popup menu is visible
-
- Closed
-
- relates to
-
JDK-6470128 Escape Key causes JMenu Selection to Disappear
-
- Closed
-
-
JDK-6513492 Escape key needs to be pressed twice to remove focus from an empty/diabled Menu.
-
- Closed
-
-
JDK-6538132 Regression: Pressing Escape key don't close the menu items from jdk7.0 b07 onwards
-
- Closed
-