We would like to know how to open a JOptionPane by another JOptionPane.
import javax.swing.JOptionPane; /* w ww. j a v a2 s . c om*/ public class Main { public static void main(String args[]) { int choose = JOptionPane.showConfirmDialog(null, "Open Dialog ??"); if (choose == JOptionPane.YES_OPTION) { JOptionPane.showMessageDialog(null, "You Clicked Yes !!"); } else if (choose == JOptionPane.NO_OPTION) { JOptionPane.showMessageDialog(null, "You Clicked NO"); } } }