Java JTextField Focus minimoCaracteres(JTextField txt, FocusEvent e, int pValor)

Here you can find the source of minimoCaracteres(JTextField txt, FocusEvent e, int pValor)

Description

minimo Caracteres

License

Open Source License

Declaration

public static boolean minimoCaracteres(JTextField txt, FocusEvent e, int pValor) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.event.FocusEvent;

import javax.swing.JTextField;

public class Main {
    public static boolean minimoCaracteres(JTextField txt, FocusEvent e, int pValor) {
        if (txt.getText().length() <= pValor) {
            return true;
        }/*from w  w  w  .  j  a v a 2 s.com*/
        return false;
    }
}

Related

  1. addNewFocusListenerForTextField(final JTextField textField, final Runnable r)
  2. attachListenerOnLabelClickFocusTextElement(JLabel label, final JTextField textField)
  3. clearOnFocus(final JTextField jtf, final String onlyInText)
  4. configureFocusActionKeys(JTextField textField, boolean primary)
  5. makeSureUserGetsFocus(final JTextField field)