public void propertyChange(PropertyChangeEvent e) {
		String prop = e.getPropertyName();

		if (isVisible()
				&& (e.getSource() == optionPane)
				&& (JOptionPane.VALUE_PROPERTY.equals(prop) || JOptionPane.INPUT_VALUE_PROPERTY
						.equals(prop))) {
			Object value = optionPane.getValue();

			if (value == JOptionPane.UNINITIALIZED_VALUE) {
				// ignore reset
				return;
			}

			// Reset the JOptionPane's value.
			// If you don't do this, then if the user
			// presses the same button next time, no
			// property change event will be fired.
			optionPane.setValue(JOptionPane.UNINITIALIZED_VALUE);

			if (btnString1.equals(value)) { // Save & Quit pressed
				if (parent.save()) {
					// If save succeeded
					parent.toMenu();
				}
				clearAndHide();
			} else if (btnString2.equals(value)) { // Discard & Quit pressed
				parent.toMenu();
				clearAndHide();
			} else if (btnString3.equals(value)) { // Cancel pressed
				clearAndHide();
			}
		}

	}