Here you can find the source of esFecha(KeyEvent e)
public static boolean esFecha(KeyEvent e)
//package com.java2s; //License from project: Open Source License import java.awt.event.KeyEvent; public class Main { public static boolean esFecha(KeyEvent e) { char c = e.getKeyChar(); if (!Character.isDigit(c) && c != KeyEvent.VK_MINUS) { return true; }/*from w w w . j a va2 s. c o m*/ return false; } }