Preciso de ajuda, já tentei de tudo fazer uma verificação, para verificar se o campo é nulo.
if(edCpf.getText().length() < 14 || edCpf.getText().length() > 14){
CadastrarCliente cadastrarcliente = this;
Point p = this.getLocation();
new Thread(){
@Override
public void run(){
for (int i = 0; i<6; i++){
try {
cadastrarcliente.setLocation(p.x - 10, p.y);
sleep(20);
cadastrarcliente.setLocation(p.x + 10, p.y);
sleep(20);
} catch (InterruptedException ex1) {
Logger.getLogger(CadastrarCliente.class.getName()).log(Level.SEVERE, null, ex1);
}
cadastrarcliente.setLocation(p.x, p.y);
}
}
}.start();
return;
}
Como podem ver, o CPF mesmo sem digitar nada ele cadastra.
