United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4170173 : JTextComponent.AccessibleJTextComponent.getAfterIndex(...) works incorrectly.

Details
Type:
Bug
Submit Date:
1998-08-31
Status:
Closed
Updated Date:
2010-09-23
Project Name:
JDK
Resolved Date:
2010-09-23
Component:
client-libs
OS:
solaris_2.5.1,generic
Sub-Component:
javax.accessibility
CPU:
sparc,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.2.0,5.0
Fixed Versions:
5.0 (tiger)

Related Reports
Duplicate:
Relates:

Sub Tasks

Description
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:" "





======================================================================

                                    

Comments
SUGGESTED FIX

This is a feature, not a bug.  The behavior needs to be documented
in the method javadoc.
###@###.### 2002-02-07
                                     
2002-02-07
EVALUATION

This is an accessibility bug, reassigning to Earl.
sky 1998-09-09

This is a feature, not a bug.  The behavior needs to be explained in the javadoc.  Since this is a significant change to the javadoc, it will have
to wait until Tiger.
###@###.### 2002-04-03
                                     
2002-04-03
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger

FIXED IN:
tiger

INTEGRATED IN:
tiger
tiger-b16

VERIFIED IN:
1.5


                                     
2004-09-13



Hardware and Software, Engineered to Work Together