I used maskformatter for my jtextfield.
It works like a charm but the problem is that I cant delete the number in the jtextfield.
f = new MaskFormatter( "#" );
f.setValidCharacters("123456789");
How can I include the space character so that I can accept space and digits from 1-9?