Here you can find the source of retrieveUserConfirmation(String title, String message)
public static boolean retrieveUserConfirmation(String title, String message)
//package com.java2s; //License from project: Open Source License import javax.swing.JOptionPane; public class Main { public static boolean retrieveUserConfirmation(String title, String message) { return JOptionPane.showConfirmDialog(null, message, title, JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION; }//from w w w .ja v a 2 s. c o m }