Validation of fields in java [closed]

1

How do I do a check in java SE for some data, to return a message and request this information again if it is incorrect, in an elegant way following good practices of object orientation?

    
asked by anonymous 17.09.2015 / 21:16

1 answer

1

See if you can help:

if (txtNome.getText().isEmpty()) {
     exibeMensagem();
     txtNome.requestFocus();
     return;
}

If it does not help, please improve your question a bit and specify your problem better, as @ Jéferson Bueno suggested.

    
17.09.2015 / 22:09