AddModifyUserWindow window = new AddModifyUserWindow(user.getUserType());
AddModifyUserWindow window = new AddModifyUserWindow(user.getUserType(), AddModifyUserWindow.TYPE_MODIFY);
    public void actionPerformed(ActionEvent arg0) {        User user = mainFrame.getUserSelected();        if (user == null)            return;        try {	        if (UserDao.TYPE_SECRETARY.equals(user.getUserType()))	            user = DaoManager.getUserDao().getUser(user, new String[] {UserDao.JOIN_FORMATIONS_IN_CHARGE});		        AddModifyUserWindow window = new AddModifyUserWindow(user.getUserType());	        window.setName(user.getName());	        window.setSurname(user.getFirstName());	        window.setCourrielMail(user.getEMail());	        window.setBuilding(user.getBuildingNameForOffice());	        window.setLocal(user.getOfficeName());	        window.setPhone(user.getTelephone());	        window.setFormations(user.getFormationsInCharge());	        window.show();	        	        if (window.isOk()) {	            user.setName(window.getName());	            user.setFirstName(window.getSurname());	            user.setEMail(window.getCourrielMail());	            user.setBuildingNameForOffice(window.getBuilding());	            user.setOfficeName(window.getLocal());	            user.setTelephone(window.getPhone());	            user.setFormationsInCharge(window.getFormations());                DaoManager.getUserDao().modifyUser(user);                                mainFrame.getModel().fireRefreshUser(user, BoTModel.TYPE_MODIFY);                                JOptionPane.showMessageDialog(null, "Modification effectue avec succs", "Information", JOptionPane.INFORMATION_MESSAGE);	        }        } catch (Exception e) {            JOptionPane.showMessageDialog(null, "Une erreur interne est survenue", "Erreur", JOptionPane.ERROR_MESSAGE);        }    }