private void addNewUser() {
NewUserDlg dlg = new NewUserDlg();
if (dlg.showDialog()) {
String userName = dlg.getUserName();
if (userName.length() > 0) {
User user = new User(userName);
LogManager.getInstance().logMessage(LogMessage.INFO,
"Adding user " + userName);
DefaultListModel newListModel = getNewDefaultModel();
if (!newListModel.contains(user)) {
newListModel.addElement(user);
userList.setModel(newListModel);
listModel = newListModel;
userList.setSelectedIndex(listModel.getSize() - 1);
Config.getEditInstance().addUser(
new User(dlg.getUserName()));
} else {
LogManager.getInstance().logMessage(LogMessage.INFO,
"User " + userName + " already exists!");
JOptionPane.showMessageDialog(parent,
"User already exists", "User not added",