JTextField textField = new JTextField();
// Focustraversal keys moeten afgezet worden, anders wordt de keylistener niet getriggered.
textField.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
new HashSet<AWTKeyStroke>());
textField.addKeyListener(createKeyListener());
textField.addFocusListener(new SelectAllFocusListener(textField));
textField.addFocusListener(createFocusListener());
return textField;
}