Hi list,

I commited the attached patch to fix a method in
javax.swing.JTabbedPane.


Michael


2005-02-10  Michael Koch  <[EMAIL PROTECTED]>

        * javax/swing/JTabbedPane.java
        (Page.setDisplayedMnemonicIndex): Handle empty menmonic.

Index: javax/swing/JTabbedPane.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JTabbedPane.java,v
retrieving revision 1.11.4.1
diff -u -r1.11.4.1 JTabbedPane.java
--- javax/swing/JTabbedPane.java        8 Feb 2005 05:22:34 -0000       1.11.4.1
+++ javax/swing/JTabbedPane.java        10 Feb 2005 16:18:08 -0000
@@ -518,12 +518,12 @@
      *         or equal to title.length.
      */
     public void setDisplayedMnemonicIndex(int index)
-                                   throws IllegalArgumentException
+      throws IllegalArgumentException
     {
       if (index < -1 || title != null && index >= title.length())
        throw new IllegalArgumentException();
 
-      if (title == null || title.charAt(index) != mnemonicKey)
+      if (title == null || mnemonicKey == 0 || title.charAt(index) != 
mnemonicKey)
        index = -1;
 
       underlinedChar = index;
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to