Here you can find the source of confirm(String msg)
Parameter | Description |
---|---|
question | a parameter |
public static boolean confirm(String msg)
//package com.java2s; //License from project: Open Source License import javax.swing.JOptionPane; public class Main { /**//from w w w . j a va 2s.c o m * Mnenomic for {@link JOptionPane#showConfirmDialog(Component, Object)} * * @param question * @return true if OK */ public static boolean confirm(String msg) { int opt = JOptionPane.showConfirmDialog(null, msg); return opt == JOptionPane.OK_OPTION; } }