JFormattedTextField deleting inserted data [closed]

2

I have 4 TextFields to put DDD, numbers before hifen, numbers after hifen and zip.

private JTextField ddd=null;

private JTextField antesh=null;

private JTextField depoish=null;

And a method formatarTextboxes();

try{
            this.ddd = new JFormattedTextField(new MaskFormatter("###"));
            this.antesh = new JFormattedTextField(new MaskFormatter("#####"));
            this.depoish = new JFormattedTextField(new MaskFormatter("####"));
            this.cep = new JFormattedTextField(new MaskFormatter("#####-###"));
        }catch(Exception e){
            System.out.println(e);
        }

But when I enter 27, in the DDD and tighten tab or change the field to add data in the other TextBoxes, the contents that I inserted in the DDD simply disappear, I can not see error in my code, since it was working properly 2 days ago and I did not even change the code.

    
asked by anonymous 02.09.2017 / 18:14

0 answers