Package net.sf.gridarta.gui.utils
Class TextComponentUtils
- java.lang.Object
-
- net.sf.gridarta.gui.utils.TextComponentUtils
-
public class TextComponentUtils extends java.lang.ObjectUtility class forJTextComponentrelated functions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsetActionNextFocus(@NotNull javax.swing.JTextField textField, @NotNull java.awt.Component nextComponent)Transfers the focus to another component when ENTER is pressed.static voidsetAutoSelectOnFocus(@NotNull javax.swing.text.JTextComponent textComponent)Selects all text of aJTextComponentwhen the component gains the focus.
-
-
-
Method Detail
-
setAutoSelectOnFocus
public static void setAutoSelectOnFocus(@NotNull @NotNull javax.swing.text.JTextComponent textComponent)Selects all text of aJTextComponentwhen the component gains the focus.- Parameters:
textComponent- the text component
-
setActionNextFocus
public static void setActionNextFocus(@NotNull @NotNull javax.swing.JTextField textField, @NotNull @NotNull java.awt.Component nextComponent)Transfers the focus to another component when ENTER is pressed.- Parameters:
textField- the text field to tracknextComponent- the component to transfer the focus to
-
-