Example usage for javax.swing JTabbedPane getComponentAt

List of usage examples for javax.swing JTabbedPane getComponentAt

Introduction

In this page you can find the example usage for javax.swing JTabbedPane getComponentAt.

Prototype

public Component getComponentAt(int index) 

Source Link

Document

Returns the component at index.

Usage

From source file:plugin.notes.NotesPlugin.java

/**
 * Changes to the notes plugin as the active tab
 *
 * @param evt//from w ww. j a v  a  2 s . c  o  m
 *          Action Event of a click on the tool menu item
 */
private static void toolMenuItem(ActionEvent evt) {
    JTabbedPane tp = GMGenSystemView.getTabPane();

    IntStream.range(0, tp.getTabCount()).filter(i -> tp.getComponentAt(i) instanceof NotesView)
            .forEach(tp::setSelectedIndex);
}