Java JOptionPane Confirmation ConfirmMessage(String strMsg)

Here you can find the source of ConfirmMessage(String strMsg)

Description

Confirm Message

License

Apache License

Declaration

static boolean ConfirmMessage(String strMsg) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.awt.Component;

import javax.swing.JOptionPane;

public class Main {
    static boolean ConfirmMessage(String strMsg) {
        if ((JOptionPane.showConfirmDialog((Component) null, strMsg, "Peticion",
                JOptionPane.OK_CANCEL_OPTION)) == JOptionPane.OK_OPTION)
            return true;
        else/*from  w  w w.  j  a v a 2 s  .c  om*/
            return false;
    }
}

Related

  1. confirmationPrompt(String msg, String title, Component parent)
  2. confirmChangeReference(boolean isChangingProject)
  3. confirmDialog(Component owner, String title, String message)
  4. confirmDialog(String msg, String title)
  5. confirmDialogWorker(Component owner, String title, String message, ModalityType modalityType, int option)
  6. confirmUserChoiceWithCustomOptions(final Component sourceComponent, final String question, final String defaultOption, final String... options)
  7. confirmWindow(String title, String message)
  8. displayConfirm(Component parent, String message, String title, int optionType, int messageType)
  9. displayConfirmPane(String desc, String title)