-
Bug
-
Resolution: Fixed
-
P2
-
1.2.0, 5.0
-
tiger
-
generic, sparc
-
generic, solaris_2.5.1
-
Verified
Name: aaC67449 Date: 08/31/98
JTextComponent.AccessibleJTextComponent.getAfterIndex(int part, int index) works incorrectly, when 'part' parameter is AccessibleText.WORD.
It returns a space (" ") instead of the correct word.
See example:
---------------- Example -----------------
import com.sun.java.swing.*;
import com.sun.java.accessibility.*;
public class Test {
public static void main(String argv[]) {
JTextField o=new JTextField("Test1 test2.");
AccessibleText c = o.getAccessibleContext().getAccessibleText();
if (!c.getiAfterIndex(AccessibleText.WORD,2).equals("test2"))
System.out.println("Failed. Method returns:\""+c.getAfterIndex(AccessibleText.WORD,2)+"\"");
else
System.out.println("Passed");
}
}
----------- output ----------------
Enabling platform fonts
Failed. Method returns:" "
======================================================================
JTextComponent.AccessibleJTextComponent.getAfterIndex(int part, int index) works incorrectly, when 'part' parameter is AccessibleText.WORD.
It returns a space (" ") instead of the correct word.
See example:
---------------- Example -----------------
import com.sun.java.swing.*;
import com.sun.java.accessibility.*;
public class Test {
public static void main(String argv[]) {
JTextField o=new JTextField("Test1 test2.");
AccessibleText c = o.getAccessibleContext().getAccessibleText();
if (!c.getiAfterIndex(AccessibleText.WORD,2).equals("test2"))
System.out.println("Failed. Method returns:\""+c.getAfterIndex(AccessibleText.WORD,2)+"\"");
else
System.out.println("Passed");
}
}
----------- output ----------------
Enabling platform fonts
Failed. Method returns:" "
======================================================================
- duplicates
-
JDK-4170174 JTextComponent.AccessibleJTextComponent.getBeforeIndex(...) works incorrectly.
- Closed
- relates to
-
JDK-4256661 TextComponent.AccessibleAWTTextComponent.getBeforeIndex(...) works incorrectly.
- Closed