ipw969 / 370Project

GNU General Public License v2.0
2 stars 1 forks source link

Cancelling the "Add Volunteer" quits the whole system, instead of returning to the main menu #48

Open matxpg opened 10 years ago

matxpg commented 10 years ago

Under MainMenu.java

private void addVolunteerButtonActionPerformed(java.awt.event.ActionEvent evt)     {                                                   
{                                         

            this.setVisible(false);
            this.dispose();
            VolunteerForm volunteerForm = new VolunteerForm(theScript, database);
            volunteerForm.setVisible(true);
            this.repaint();
}                       // TODO add your handling code here:
}                

the original main menu is disposed of when you click add volunteer,

Under VolunteerForm.java:293-296

private void cancelActionPerformed(java.awt.event.ActionEvent evt) {                                       
    setVisible(false); //you can't see me!
    dispose(); //Destroy the JFrame object
}             

but the volunteer form is disposed of when you click cancel, it doesn't just return to a main menu because that menu was disposed of. -A fix could be initializing a MainMenu with the original script / database

iainworkman commented 10 years ago

Yeah, me and Ryan were planning on bringing up the data access model that the system should probably use at the meeting today. This should simplify a lot of things, and make things a lot more consistent.