String myUser = properties.getProperty("user", "admin"); if(name.equals(myUser)) properties.setProperty("password", pass1);
String myUser = client.properties.getProperty("user", "admin"); if(name.equals(myUser)) { client.properties.setProperty("password", pass1); try { client.getResources(); } catch (XMLDBException e) { JOptionPane.showMessageDialog(this, e.getMessage()); } }
	private void actionModify() {		String name = username.getText();		if (name.length() == 0)			return;		User user = new User(name);		String pass1 = new String(password1.getPassword());		String pass2 = new String(password2.getPassword());		if(pass1.length() == 0 &&			JOptionPane.showConfirmDialog(this, "No password set. Are you sure?",				"Password missing", JOptionPane.YES_NO_OPTION)			== JOptionPane.NO_OPTION)			return;		if (!pass1.equals(pass2)) {			JOptionPane.showMessageDialog(this, "Different passwords. Please check.");			return;		}		String myUser = properties.getProperty("user", "admin");		if(name.equals(myUser))			properties.setProperty("password", pass1);				user.setPassword(pass1);		user.setHome(homedir.getText());		for (int i = 0; i < groupsModel.size(); i++)			user.addGroup((String) groupsModel.elementAt(i));		try {			service.updateUser(user);			userModel.reload();		} catch (XMLDBException e) {			JOptionPane.showMessageDialog(this, e.getMessage());		}	}