Java JTabbedPane getJTabbedPaneAncestor(Component c)

Here you can find the source of getJTabbedPaneAncestor(Component c)

Description

get J Tabbed Pane Ancestor

License

Open Source License

Declaration

public static JTabbedPane getJTabbedPaneAncestor(Component c) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Component;

import javax.swing.JTabbedPane;

public class Main {
    public static JTabbedPane getJTabbedPaneAncestor(Component c) {
        while (c != null) {
            if (c instanceof JTabbedPane) {
                return (JTabbedPane) c;
            }//w ww.  j a va  2s.c  om
            c = c.getParent();
        }
        return null;
    }
}

Related

  1. containsTab(JTabbedPane tabs, String name)
  2. createTabbedPane()
  3. findParentJTabbedPane(JComponent c)
  4. getConfigPanelFromTabbedPane(JTabbedPane mainTabbedPane)
  5. getIndexOf(JTabbedPane tabbedPane, Component component)
  6. getLineTabs(StyledDocument doc, int startOffset)
  7. getNextSubTabIndex(JTabbedPane tabs, int tabIndex)
  8. getOffsetOfVirtualColumn(Segment seg, int tabSize, int column, int[] totalVirtualWidth)
  9. getParagraphStyle(SimpleAttributeSet attrSet, int align, float firstLineIndent, float leftIndent, float rightIndent, float lineSpace, float spaceAbove, float spaceBelow, TabSet tabs)