AddModifyElementWindow window = new AddModifyElementWindow(ElementDao.TYPE_ROOM);
AddModifyElementWindow window = new AddModifyElementWindow(ElementDao.TYPE_ROOM, AddModifyElementWindow.TYPE_MODIFY);
    public void actionPerformed(ActionEvent arg0) {        Room room = mainFrame.getRoomSelected();        if (room == null) {            room = mainFrame.getModel().getTimetable().getRoom();            if (room == null)                return;        }        AddModifyElementWindow window = new AddModifyElementWindow(ElementDao.TYPE_ROOM);        window.setEquipmentName(room.getName());        window.setDescriptionEquipment(room.getDescription());        window.setBuildingName(room.getBuildingName());        window.show();                if (window.isOk()) {            room.setName(window.getEquipmentName());            room.setDescription(window.getDescriptionEquipment());            room.setBuildingName(window.getBuildingName());            try {                DaoManager.getElementDao().modifyRoom(room);                                mainFrame.getModel().fireRefreshRoom(room, 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);            }        }    }