public final class Mnemonics extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
findMnemonicAmpersand(String text)
Searches for an ampersand in a string which indicates a mnemonic.
|
static void |
setLocalizedText(AbstractButton item,
String text)
Sets the text for a menu item or other subclass of AbstractButton.
|
static void |
setLocalizedText(JLabel item,
String text)
Sets the text for the label or other subclass of JLabel.
|
public static void setLocalizedText(AbstractButton item, String text)
Examples:
| Input String | View under JDK 1.4 or later |
|---|---|
Save &As | Save As |
Rock & Roll | Rock & Roll |
Drag & &Drop | Drag & Drop |
&Файл | Файл |
item - a button whose text will be changedtext - new labelpublic static void setLocalizedText(JLabel item, String text)
setLocalizedText(AbstractButton, String).item - a label whose text will be settext - new labelpublic static int findMnemonicAmpersand(String text)
text - text to searchBuilt on August 24 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.