JOptionPane confirm Yes No Cancel Dialog - Java Swing

Java examples for Swing:JOptionPane

Description

JOptionPane confirm Yes No Cancel Dialog

Demo Code


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

public class Main {
    public static int confirmYesNoCancel(JFrame root, String text) {
        return JOptionPane.showConfirmDialog(root, text, "Confirm",
                JOptionPane.YES_NO_CANCEL_OPTION);
    }/* w w  w .  ja  va2s. c  o m*/
}

Related Tutorials