Here you can find the source of showReplaceExistingFileConfirmDialog(Component parentComponent, File file)
public static int showReplaceExistingFileConfirmDialog(Component parentComponent, File file)
//package com.java2s; //License from project: Open Source License import java.awt.Component; import java.io.File; import javax.swing.JOptionPane; public class Main { public static int showReplaceExistingFileConfirmDialog(Component parentComponent, File file) { return JOptionPane.showConfirmDialog(parentComponent, "Do you want to replace the existing file " + file + " ?", "Warning", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); }/* w w w . j av a 2 s. c o m*/ }