Example usage for javax.swing JTabbedPane setIconAt

List of usage examples for javax.swing JTabbedPane setIconAt

Introduction

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

Prototype

@BeanProperty(preferred = true, visualUpdate = true, description = "The icon at the specified tab index.")
public void setIconAt(int index, Icon icon) 

Source Link

Document

Sets the icon at index to icon which can be null.

Usage

From source file:org.springframework.richclient.factory.DefaultComponentFactory.java

public void addConfiguredTab(JTabbedPane tabbedPane, String labelKey, JComponent tabComponent) {
    org.springframework.richclient.core.LabelInfo info = getLabelInfo(getRequiredMessage(labelKey));
    tabbedPane.addTab(info.getText(), tabComponent);
    int tabIndex = tabbedPane.getTabCount() - 1;
    tabbedPane.setMnemonicAt(tabIndex, info.getMnemonic());
    tabbedPane.setDisplayedMnemonicIndexAt(tabIndex, info.getMnemonicIndex());
    tabbedPane.setIconAt(tabIndex, getIcon(labelKey));
    tabbedPane.setToolTipTextAt(tabIndex, getCaption(labelKey));
}