changeset 13348:c08c50d1ddea

7124330: [macosx] javax.swing.JComboBox throws unexpected ClassCastException Reviewed-by: kizune
author rupashka
date Thu, 19 Jul 2012 19:09:30 +0400
parents 92c2140b5bb2
children b12dcd2c3e07
files jdk/src/macosx/classes/com/apple/laf/AquaComboBoxUI.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxUI.java	Wed Jul 18 18:25:49 2012 +0400
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxUI.java	Thu Jul 19 19:09:30 2012 +0400
@@ -259,7 +259,8 @@
     protected void installKeyboardActions() {
         super.installKeyboardActions();
 
-        final ActionMap actionMap = comboBox.getActionMap();
+        ActionMap actionMap = new ActionMapUIResource();
+
         actionMap.put("aquaSelectNext", highlightNextAction);
         actionMap.put("aquaSelectPrevious", highlightPreviousAction);
         actionMap.put("aquaEnterPressed", triggerSelectionAction);
@@ -269,6 +270,8 @@
         actionMap.put("aquaSelectEnd", highlightLastAction);
         actionMap.put("aquaSelectPageUp", highlightPageUpAction);
         actionMap.put("aquaSelectPageDown", highlightPageDownAction);
+
+        SwingUtilities.replaceUIActionMap(comboBox, actionMap);
     }
 
     abstract class ComboBoxAction extends AbstractAction {