AddModifySubjectWindow window = new AddModifySubjectWindow();
Subject subject = mainFrame.getSubjectSelected(); if (subject == null) return;  AddModifySubjectWindow window = new AddModifySubjectWindow(AddModifySubjectWindow.TYPE_MODIFY); window.setIntitule(subject.getHeading()); window.setIdTeacher(subject.getIdTeacher()); window.setNbMagHours(subject.getNbMagHours()); window.setNbTdHours(subject.getNbTdHours()); window.setNbTpHours(subject.getNbTpHours()); window.setNbMagGroups(subject.getNbMagGroups()); window.setNbTdGroups(subject.getNbTdGroups()); window.setNbTpGroups(subject.getNbTpGroups());
    public void actionPerformed(ActionEvent arg0) {        AddModifySubjectWindow window = new AddModifySubjectWindow();        window.show();    }