List of usage examples for javax.swing JTabbedPane setIconAt
@BeanProperty(preferred = true, visualUpdate = true, description = "The icon at the specified tab index.") public void setIconAt(int index, Icon icon)
index
to icon
which can be null
. 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)); }