Disabled buttons should not be able to receive focus. I fixed this in
AbstractButton.setEnabled(). Note that this really is a button issue, in
general it is possible for disabled components to receive focus. This is
explicitly stated in the focus specification:
file:///home/roman/share/doc/jdk1.5.0/api/java/awt/doc-files/FocusSpec.html

2005-11-14  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/AbstractButton.java
        (setEnabled): Also set focusable flag on the button when the
enabled
        property changes.

Cheers,
Roman
Index: javax/swing/AbstractButton.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/AbstractButton.java,v
retrieving revision 1.48
diff -u -r1.48 AbstractButton.java
--- javax/swing/AbstractButton.java	18 Oct 2005 13:42:55 -0000	1.48
+++ javax/swing/AbstractButton.java	14 Nov 2005 11:53:13 -0000
@@ -956,6 +956,7 @@
     if (b == isEnabled())
       return;
     super.setEnabled(b);
+    setFocusable(b);
     ButtonModel mod = getModel();
     if (mod != null)
       mod.setEnabled(b);
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to