birthdateLabel.setLayoutData(data);
}
private void createBirthdateText() {
birthdateText = new FormattedText(mainComposite, SWT.SINGLE | SWT.BORDER);
DateFormatter dateFormatter = new DateFormatter("dd/MM/yyyy");
birthdateText.setFormatter(dateFormatter);
birthdateText.getControl().addFocusListener(new RequiredWhenLostFocus(birthdateText, RequiredWhenLostFocus.ERROR_REQUIRED_BIRTHDATE, screenMessageLabel));
birthdateText.getControl().setText("");
birthdateText.getControl().addFocusListener(new FocusListener(){
public void focusLost(FocusEvent arg0) {
if (birthdateText.getControl().getText().contains(" ")) {
DateFormatter dateFormatter = new DateFormatter("dd/MM/yyyy");
birthdateText.setFormatter(dateFormatter);
birthdateText.getControl().setText("");
screenMessageLabel.setText("Data de nascimento inv�lida. ");
}
}