Java JOptionPane Confirmation confirm(String message)

Here you can find the source of confirm(String message)

Description

confirm

License

Open Source License

Declaration

public static boolean confirm(String message) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.*;
import javax.swing.*;

public class Main {
    public static boolean confirm(String message) {
        return confirm(null, message);
    }//from w  w  w  . ja  v  a 2 s .  c  om

    public static boolean confirm(Component parentComponent, String message) {
        return JOptionPane.showConfirmDialog(parentComponent, message, "Confirm Action",
                JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
    }
}

Related

  1. askConfirmation(final Window aWindow, final String aMessage, final String aTitle)
  2. confirm(Component component, String title, String msg)
  3. confirm(final Component component, final String title, final String message)
  4. confirm(String message)
  5. confirm(String message, boolean typeYesNo)
  6. confirm(String message, String title)
  7. confirm(String msg)