Hello. I now know how to allow the user to enter only numeric input in a FormattedTextField. What I need help with now is how to allow the user to only input letters. An example is what I have below. The problem I keep getting is it won't allow me to input letters, along with numbers.
public MaskFormatter twocreateMaskFormat(String ft)
{
MaskFormatter nFormat = null;
try
{
nFormat = new MaskFormatter(ft);
nFormat.setValidCharacters("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
}
catch (java.text.ParseException e)
{
e.printStackTrace();
}
return nFormat;
}