JOptionPane yes No Dialog - Java Swing

Java examples for Swing:JOptionPane

Description

JOptionPane yes No Dialog

Demo Code


//package com.java2s;
import java.awt.Component;

import javax.swing.JOptionPane;

public class Main {
    public static int yesNoDialog(Component owner, String message) {
        return JOptionPane.showConfirmDialog(owner, message, "Confirm",
                JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
    }//from www .ja  va 2 s . c  om
}

Related Tutorials