public class TextComponentUtils
extends java.lang.Object
JTextComponent
related functions.Modifier and Type | Method and Description |
---|---|
static void |
setActionNextFocus(javax.swing.JTextField textField,
java.awt.Component nextComponent)
Transfers the focus to another component when ENTER is pressed.
|
static void |
setAutoSelectOnFocus(javax.swing.text.JTextComponent textComponent)
Selects all text of a
JTextComponent when the component gains the
focus. |
public static void setAutoSelectOnFocus(@NotNull javax.swing.text.JTextComponent textComponent)
JTextComponent
when the component gains the
focus.textComponent
- the text componentpublic static void setActionNextFocus(@NotNull javax.swing.JTextField textField, @NotNull java.awt.Component nextComponent)
textField
- the text field to tracknextComponent
- the component to transfer the focus to