-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0, 5.0
-
b28
-
generic, sparc
-
generic, solaris_2.5.1
-
Verified
Name: aaC67449 Date: 07/23/99
The Menu.Component. AccessibleAWTMenuComponent.getAccessibleIndexInParent()
always returns -1, but should return "the index of this object in its parent".
javadoc says:"
public int getAccessibleIndexInParent()
Get the index of this object in its accessible parent.
Overrides:
getAccessibleIndexInParent in class AccessibleContext
Returns:
the index of this object in its parent; -1 if this object does not have an
accessible parent.
See Also:
getAccessibleParent()
"
See example.
------------- example --------------
import java.awt.Menu;
import java.awt.MenuItem;
import javax.accessibility.AccessibleContext;
public class Test {
public static void main(String argv[]) {
MenuItem o = new MenuItem();
AccessibleContext c = o.getAccessibleContext();
Menu parent = new Menu();
parent.add(new MenuItem());
parent.add(o);
System.out.println("index="+c.getAccessibleIndexInParent());
}
}
------------- JDK1.3L output ---------------
Warning: JIT compiler "sunwjit" not found. Will use interpreter.
index=-1
======================================================================