ConfirmPopUps.java Source code

Java tutorial

Introduction

Here is the source code for ConfirmPopUps.java

Source

import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class ConfirmPopUps {

    public static void main(String[] a) {
        JFrame frame = new JFrame();
        int result = JOptionPane.showConfirmDialog(frame, "Continue printing?");
        // JOptionPane.showInternalConfirmDialog(desktop, "Continue printing?");

        System.out.println(JOptionPane.CANCEL_OPTION == result);
    }

}