Java JTabbedPane getTabIndex(final JTabbedPane tabs, final String title)

Here you can find the source of getTabIndex(final JTabbedPane tabs, final String title)

Description

get Tab Index

License

Apache License

Declaration

static int getTabIndex(final JTabbedPane tabs, final String title) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.swing.JTabbedPane;

public class Main {
    static int getTabIndex(final JTabbedPane tabs, final String title) {
        for (int i = 0; i < tabs.getTabCount(); i++) {
            if (tabs.getTitleAt(i).equals(title)) {
                return i;
            }/*from  w ww.  j av  a2 s  .  c  om*/

        }
        return -1;
    }
}

Related

  1. getOffsetOfVirtualColumn(Segment seg, int tabSize, int column, int[] totalVirtualWidth)
  2. getParagraphStyle(SimpleAttributeSet attrSet, int align, float firstLineIndent, float leftIndent, float rightIndent, float lineSpace, float spaceAbove, float spaceBelow, TabSet tabs)
  3. getTabbedPaneComponentIndex(JTabbedPane tabbedPane, String title)
  4. getTabbedPaneFor(Component c)
  5. getTabComponentIndex(JTabbedPane tbp, Component component)
  6. getTabIndexAt(JTabbedPane tabbedPane, int x, int y)
  7. getTabPaneLeadingPlacement()
  8. getTabsHeight()
  9. getVirtualWidth(Segment seg, int tabSize)