Code example for JLabel

Methods: getDisplayedMnemonic

0
    private void setMostRecentlyAddedMnemonicLabel(Component component) {
        if (!(component instanceof JLabel)) {
            return; 
        } 
        JLabel label = (JLabel) component;
        if (label.getDisplayedMnemonic() != -1) {
            mostRecentlyAddedMnemonicLabelReference =
                new WeakReference(label);
        } 
    } 
 
 
    private void clearMostRecentlyAddedMnemonicLabel() { 
        mostRecentlyAddedMnemonicLabelReference = null;
    } 
 
}