public final class Mnemonics
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static int |
findMnemonicAmpersand(java.lang.String text) |
Searches for an ampersand in a string which indicates a mnemonic.
|
static void |
setLocalizedText(javax.swing.AbstractButton item,
java.lang.String text) |
Sets the text for a menu item or other subclass of AbstractButton.
|
static void |
setLocalizedText(javax.swing.JLabel item,
java.lang.String text) |
Sets the text for the label or other subclass of JLabel.
|
public static void setLocalizedText(javax.swing.AbstractButton item,
java.lang.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(javax.swing.JLabel item,
java.lang.String text)
setLocalizedText(AbstractButton, String).item - a label whose text will be settext - new labelpublic static int findMnemonicAmpersand(java.lang.String text)
text - text to searchBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.