Here you can find the source of showConfirmationDialog(Component parent, String message)
Parameter | Description |
---|---|
parent | a parameter |
message | a parameter |
public static boolean showConfirmationDialog(Component parent, String message)
//package com.java2s; /*/*from w w w .jav a 2 s . c om*/ * Copyright (c) 2007-2012 The Broad Institute, Inc. * SOFTWARE COPYRIGHT NOTICE * This software and its documentation are the copyright of the Broad Institute, Inc. All rights are reserved. * * This software is supplied without any warranty or guaranteed support whatsoever. The Broad Institute is not responsible for its use, misuse, or functionality. * * This software is licensed under the terms of the GNU Lesser General Public License (LGPL), * Version 2.1 which is available at http://www.opensource.org/licenses/lgpl-2.1.php. */ import javax.swing.*; import java.awt.*; public class Main { /** * Method description * * @param parent * @param message * @return */ public static boolean showConfirmationDialog(Component parent, String message) { int status = JOptionPane.showConfirmDialog(parent, message, null, JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null); if ((status == JOptionPane.CANCEL_OPTION) || (status == JOptionPane.CLOSED_OPTION)) { return false; } return true; } }