show Confirm Message Dialog - Java Swing

Java examples for Swing:JOptionPane

Description

show Confirm Message Dialog

Demo Code


//package com.java2s;
import javax.swing.JOptionPane;

public class Main {
    public static int showConfirmMessage(String message) {
        return JOptionPane.showOptionDialog(null, message, "Question",
                JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,
                null, new Object[] { "Yes", "No" }, null);
    }//from www .jav  a2  s.com
}

Related Tutorials