I created a format for my jFormattedTextField
MaskFormatter formatter = new MaskFormatter("###.###.###.###");
formatter.setValidCharacters("0123456789");
jFormattedTextField7 = new javax.swing.JFormattedTextField(formatter);
but anytime I try to insert a value in the jFormattedTextField, switching to another one to insert an input value, the one in the code gets empty again.


You haven't entered a number in each position, therefore it is considered invalid. Try: