Example usage for javax.swing JComponent equals

List of usage examples for javax.swing JComponent equals

Introduction

In this page you can find the example usage for javax.swing JComponent equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:com.haulmont.cuba.desktop.sys.DesktopWindowManager.java

protected int getTabPosition(JComponent tab) {
    int position = -1;
    for (int i = 0; i < tabsPane.getTabCount(); i++) {
        if (tab.equals(tabsPane.getComponentAt(i))) {
            position = i;//from www .  j a  v  a  2s .  co m
        }
    }
    return position;
}