public static int showYesNoCancelQuestion(final Component parent, final String msg) {
    return JOptionPane.showConfirmDialog(
        isIconified(parent) ? null : parent,
        msg,
        System.getProperty(DEFAULT_WINDOW_TITLE_PROPERTY),
        JOptionPane.YES_NO_CANCEL_OPTION,
        JOptionPane.QUESTION_MESSAGE);
  }
Shows a question the user can answer with Yes/No/Cancel.

@param parent Parent window of the message box.
@param msg Message shown in the message box.
@return An integer indicating the option selected by the user.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/CMessageBox.java