public static int getTabbIndex(JComponent component) {
        Container tabb = component.getParent();
        Component lastComponent = component;
        while (!(tabb instanceof JTabbedPane)) {
            lastComponent = tabb;
            tabb = tabb.getParent();
        }
        return ((JTabbedPane) tabb).indexOfComponent(lastComponent);
    }
This provide the overall frame and top level ui elements
ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/MainPanel.java