Java JOptionPane Confirmation displayConfirmPane(String desc, String title)

Here you can find the source of displayConfirmPane(String desc, String title)

Description

display Confirm Pane

License

Open Source License

Declaration

public static boolean displayConfirmPane(String desc, String title) 

Method Source Code

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

import javax.swing.JOptionPane;

public class Main {
    public static boolean displayConfirmPane(String desc, String title) {
        if (title == null)
            title = "Confirmation required";
        int res = JOptionPane.showConfirmDialog(null, desc, title, JOptionPane.YES_NO_OPTION);
        if (res == JOptionPane.YES_OPTION)
            return true;
        else//from w  w w.j  a  v a  2  s.c o  m
            return false;
    }
}

Related

  1. confirmDialogWorker(Component owner, String title, String message, ModalityType modalityType, int option)
  2. ConfirmMessage(String strMsg)
  3. confirmUserChoiceWithCustomOptions(final Component sourceComponent, final String question, final String defaultOption, final String... options)
  4. confirmWindow(String title, String message)
  5. displayConfirm(Component parent, String message, String title, int optionType, int messageType)
  6. getConfirmation(Component parent, String str)
  7. getConfirmation(Component parent, String str)
  8. getUserConfirmation(Component cp, String message)
  9. getUserConfirmation(String arg1)