Java JOptionPane Message ShowOkCancelMessage(String msg)

Here you can find the source of ShowOkCancelMessage(String msg)

Description

Show Ok Cancel Message

License

Open Source License

Declaration

public static boolean ShowOkCancelMessage(String msg) 

Method Source Code

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

import javax.swing.JOptionPane;

public class Main {
    public static boolean ShowOkCancelMessage(String msg) {
        int result = JOptionPane.showConfirmDialog(null, msg, "Confirmation dialog", JOptionPane.OK_CANCEL_OPTION);

        if (result == JOptionPane.YES_OPTION)
            return true;
        else//from w w w . jav  a2s.c  om
            return false;
    }
}

Related

  1. showMessage(String title, String message)
  2. showMessage(String title, String message, java.awt.Component parent)
  3. showMessageInEventQueue(final String message, final String title)
  4. showMessages(Component parent, List messages)
  5. showMsg(final Container parent, final String message)
  6. ShowOkMessage(String msg)
  7. showPrettyYesNoPane(Component caller, String msg, String title)
  8. showQuestionThreeChoicesBox(Component pParent, String pMessage, String pTitle, String pLeftOption, String pMiddleOption, String pRightOption)
  9. showSuccessMessage(Component parentComponent, String message)