List of usage examples for javax.swing JComponent getAccessibleContext
public AccessibleContext getAccessibleContext()
From source file:MainClass.java
void dumpConnectedInfo(AccessibleContext ac) { AccessibleRelationSet ars = ac.getAccessibleRelationSet(); AccessibleRelation ar = null; if (ars != null) ar = ars.get("connector"); if (ar != null) { Object[] o = ar.getTarget(); JComponent jc = (JComponent) o[0]; System.out.println("Label connected to: " + jc.getAccessibleContext().getAccessibleName()); return;/*from w w w .j a v a 2 s . c o m*/ } int nChildren = ac.getAccessibleChildrenCount(); for (int i = 0; i < nChildren; i++) dumpConnectedInfo(ac.getAccessibleChild(i).getAccessibleContext()); }