-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
beta
-
x86
-
windows_nt
-
Verified
JPopup and JMenu* do not work properly with the keyboard.
JPopup does not work with the keyboard (arrow keys, enter key, etc.). We had to implement a work around in a derived class.
Enter key is not always processed by JMenu.
We have cases where we are doing the following on an instance of JPanel:
// Add the search action to the action map for the filter panel.
// This will effectively make the search button behave as the default button.
KeyStroke enterKS = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
getInputMap(WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(enterKS, searchAction);
getActionMap().put(searchAction, searchAction);
If we go to the menu from this panel and press enter on a menu item the searchAction is performed rather than the selecting the current item in the menu.
Attached is an example which demonstrates the problems. The header
comment in the source file reviews the specific problems.
JPopup does not work with the keyboard (arrow keys, enter key, etc.). We had to implement a work around in a derived class.
Enter key is not always processed by JMenu.
We have cases where we are doing the following on an instance of JPanel:
// Add the search action to the action map for the filter panel.
// This will effectively make the search button behave as the default button.
KeyStroke enterKS = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
getInputMap(WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(enterKS, searchAction);
getActionMap().put(searchAction, searchAction);
If we go to the menu from this panel and press enter on a menu item the searchAction is performed rather than the selecting the current item in the menu.
Attached is an example which demonstrates the problems. The header
comment in the source file reviews the specific problems.