[Patch][gui] JTabbedPane
Michael Koch
konqueror@gmx.de
Thu Feb 10 19:56:00 GMT 2005
Hi list,
I commited the attached patch to fix a method in
javax.swing.JTabbedPane.
Michael
2005-02-10 Michael Koch <konqueror@gmx.de>
* javax/swing/JTabbedPane.java
(Page.setDisplayedMnemonicIndex): Handle empty menmonic.
-------------- next part --------------
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;
More information about the Java-patches
mailing list