|
Yes/No confirm dialog box
I was just wondering how to creat a "yes / no" dialog box. I can create a dialog boxes with the choice for "ok/ 'x' in the corner" its just
import javax.swing.JOptionPane; //before the class declaration
JOptionPane.showMessageDialog(null, "Are you an idiot?"); //in the class
i was just wondering if someone could show me the code for a "yes/no" option dialog box.
Thanks,
Mandrake
edit: What i'm trying to do is use a yes/no dialog box as the control for a loop where if "yes" is selected the loop will run though again, but terminates if "no" is selected.
example:
Do you want more money?
Yes: (loop causes your taxes to raise)
yes: (loop causes your taxes to raise)
yes: (loop causes your taxes to raise)
No:(loop terminates, not raising your taxes)
Last edited by mandrake446 : 12-08-2007 at 06:55 AM.
|