public class SwingUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addAction(javax.swing.JComponent textComponent,
javax.swing.Action action)
Adds an accelerator key for a component.
|
static java.awt.Component |
createLabel(java.lang.String key,
java.awt.Component component)
Create a
JLabel instance. |
@NotNull public static java.awt.Component createLabel(@NotNull java.lang.String key, @Nullable java.awt.Component component)
JLabel
instance.key
- the action key to usecomponent
- the component this label is attached topublic static void addAction(@NotNull javax.swing.JComponent textComponent, @NotNull javax.swing.Action action)
textComponent
- the text component to add toaction
- the action to add