Here you can find the source of minimoCaracteres(JTextField txt, FocusEvent e, int pValor)
public static boolean minimoCaracteres(JTextField txt, FocusEvent e, int pValor)
//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; } }