Example usage for javax.swing JTabbedPane setMnemonicAt

List of usage examples for javax.swing JTabbedPane setMnemonicAt

Introduction

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

Prototype

@BeanProperty(visualUpdate = true, description = "The keyboard mnenmonic, as a KeyEvent VK constant, for the specified tab")
public void setMnemonicAt(int tabIndex, int mnemonic) 

Source Link

Document

Sets the keyboard mnemonic for accessing the specified tab.

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));
}