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
Under MainMenu.java
the original main menu is disposed of when you click add volunteer,
Under VolunteerForm.java:293-296
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