Java JOptionPane Confirmation showReplaceExistingFileConfirmDialog(Component parentComponent, File file)

Here you can find the source of showReplaceExistingFileConfirmDialog(Component parentComponent, File file)

Description

show Replace Existing File Confirm Dialog

License

Open Source License

Declaration

public static int showReplaceExistingFileConfirmDialog(Component parentComponent, File file) 

Method Source Code


//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*/
}

Related

  1. showConfirmDialog(final Component parentComponent, final String message)
  2. showConfirmDialog(String message)
  3. showConfirmDialog(String title, String message)
  4. showConfirmMessage(String message, Component component)
  5. showQuestionConfirmBox(Component pParent, String pMessage, String pTitle, String pLeftOption, String pRightOption)