public static Pair<Integer, Boolean> showYesNoQuestionWithCheckbox(
      final Component parent, final String msg, final String checkBoxTitle) {
    JCheckBox checkbox = null;
    Object params;
    if (checkBoxTitle != null) {
      checkbox = new JCheckBox(checkBoxTitle);
      params = new Object[] {msg, checkbox};
    } else {
      params = msg;
    }

    final int option =
        JOptionPane.showConfirmDialog(
            isIconified(parent) ? null : parent,
            params,
            System.getProperty(DEFAULT_WINDOW_TITLE_PROPERTY),
            JOptionPane.YES_NO_OPTION,
            JOptionPane.QUESTION_MESSAGE);
    return Pair.make(option, checkBoxTitle != null ? checkbox.isSelected() : false);
  }
Shows a question the user can answer with Yes/No with an additional checkbox below.

@param parent Parent window of the message box.
@param msg Message shown in the message box.
@param checkBoxTitle Title shown in the checkbox. If <code>null</code>, no checkbox is shown.
@return A <code>Pair</code>, where the first field indicates the button selected by the user
    and the second field indicates the selection state of the checkbox.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/CMessageBox.java