if (window.isOk()) { subject.setHeading(window.getIntitule()); subject.setIdTeacher(window.getTeacher().getIdUser()); subject.setNbMagHours(window.getNbMagHours()); subject.setNbTdHours(window.getNbTdHours()); subject.setNbTpHours(window.getNbTpHours()); subject.setNbMagGroups(window.getNbMagGroups()); subject.setNbTdGroups(window.getNbTdGroups()); subject.setNbTpGroups(window.getNbTpGroups());  try { DaoManager.getTimetableDao().modifySubject(subject);  mainFrame.getModel().fireRefreshSubject(subject, 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); } }
    public void actionPerformed(ActionEvent arg0) {        AddModifySubjectWindow window = new AddModifySubjectWindow();        window.show();    }