}
setComboBoxItems(UserBox);
setComboBoxItems(DelUserBox);
}
else if(AE.getSource()==SaveModificationsBt&&NameBox.getText().length()>0){
User Selected=Users.get(UserBox.getSelectedIndex());
String name=Selected.getUserName(),Pass=Selected.getUserPassword();
try {
DBH.MySQLUpdate("UPDATE UserAccount SET Username='"+NameBox.getText()+"',Password='"+PassBox.getText()
+"',UserType='"+UserTypeBox.getSelectedItem()+"' WHERE Username='"+UserBox.getSelectedItem()+"';");
} catch (SQLException e) {
// TODO Auto-generated catch block
NameBox.setText(name);
PassBox.setText(Pass);
ErrorMod.setFont(Parent.getWarningFont(ErrorMod));
ErrorMod.setText("Error. Modification did not occur");
}
String s=NameBox.getText();
Selected.reNameUser(s);
Selected.changePassword(PassBox.getText());
Selected.changeUserType(UserTypeBox.getSelectedItem().toString());
setComboBoxItems(UserBox);
setComboBoxItems(DelUserBox);
UserBox.setSelectedItem(s);
setListItems(UserList);
SaveModificationsBt.setEnabled(false);