Here you can find the source of queryBoolean(String message)
Parameter | Description |
---|---|
message | a parameter |
Parameter | Description |
---|---|
Exception | an exception |
public static boolean queryBoolean(String message) throws Exception
//package com.java2s; /*// w w w . j a v a 2s. c o m * Copyright (C) 2010-2014 Andreas Maier * CONRAD is developed as an Open Source project under the GNU General Public License (GPL). */ import javax.swing.JOptionPane; public class Main { /** * Queries the User for a Boolean value. * @param message * @return the chosen boolean * @throws Exception */ public static boolean queryBoolean(String message) throws Exception { int revan = JOptionPane.showConfirmDialog(null, message); return (revan == JOptionPane.YES_OPTION); } }