This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gui][patch] fix jcomponent action reset


hi,

this patch adds null checks to jcomponent's resetKeyboardActions
method. committed to java-gui-branch.

-graydon

2004-08-27 Graydon Hoare <graydon@redhat.com>

	* javax/swing/JComponent.java
	(resetKeyboardActions): Add null checks.
--- javax/swing/JComponent.java	24 Aug 2004 22:00:27 -0000	1.7.2.16
+++ javax/swing/JComponent.java	27 Aug 2004 15:41:03 -0000
@@ -1771,9 +1771,13 @@
    */
   public void resetKeyboardActions()
   {
+    if (inputMap_whenFocused != null)
     inputMap_whenFocused.clear();
+    if (inputMap_whenAncestorOfFocused != null)
     inputMap_whenAncestorOfFocused.clear();
+    if (inputMap_whenInFocusedWindow != null)
     inputMap_whenInFocusedWindow.clear();
+    if (actionMap != null)
     actionMap.clear();
   }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]