/** Set contact to be edited or use null for new one */ public void setContact(Contact contact) { setMultiMode(false); if (contact == null) { nameTextField.setText(null); numberTextField.setText(config.getCountryPrefix()); } else { nameTextField.setText(contact.getName()); numberTextField.setText(contact.getNumber()); gatewayComboBox.setSelectedGateway(contact.getGateway()); } userSet = false; }