2

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?

maxxy
  • 23
  • 2

1 Answers1

0
f = new MaskFormatter( "*" );
f.setValidCharacters("123456789 ");

accept all characters and include space..

This works for me

maxxy
  • 23
  • 2