private void closeApplication() {
    int response = JOptionPane.showOptionDialog(myCP, "Exit AIMerger?", "Exit",
        JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, null,
        JOptionPane.YES_OPTION);
    switch (response) {
      default:
        // This should never happen
        throw new IllegalArgumentException("not an option");
      case JOptionPane.CLOSED_OPTION:
      case JOptionPane.CANCEL_OPTION:
        offerNewMerge();
        break;
      case JOptionPane.OK_OPTION:
        System.exit(0);
        break;
    }
  }