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);
}

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 .
