Java JTabbedPane getNextSubTabIndex(JTabbedPane tabs, int tabIndex)

Here you can find the source of getNextSubTabIndex(JTabbedPane tabs, int tabIndex)

Description

get Next Sub Tab Index

License

Open Source License

Declaration

public static int getNextSubTabIndex(JTabbedPane tabs, int tabIndex) 

Method Source Code

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

import javax.swing.JTabbedPane;

public class Main {
    public static int getNextSubTabIndex(JTabbedPane tabs, int tabIndex) {
        int nextTabIndex = tabIndex;

        for (int i = 0; i < tabs.getComponentCount(); i++) {
            nextTabIndex++;/*from www .ja v a  2s  .c  o m*/

            if (nextTabIndex == tabs.getComponentCount()) {
                nextTabIndex = 0;
            }

            if (tabs.isEnabledAt(nextTabIndex)) {
                break;
            }
        }

        return nextTabIndex;
    }
}

Related

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