Code example for AccessibleContext

Methods: getAccessibleRole

0
        JLayer l = new JLayer();
        AccessibleContext acc = l.getAccessibleContext();
        if (acc == null) {
            throw new RuntimeException("JLayer's AccessibleContext is null");
        } 
        if (acc.getAccessibleRole() != AccessibleRole.PANEL) {
            throw new RuntimeException("JLayer's AccessibleRole must be PANEL");
        } 
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java