JOptionpane.showOptionDialog help

Object[] options = {"YES", "NO"};

JOptionPane.showOptionDialog (null, "Are you sure you want to leave", "Warning",

JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE,

null, options, options [0]

);

there is the code now i cant figure out a way to make the program exit if you say yes.. i know how stupid of me can some one plz help me?

should i write a if with a system.exit or what?

[430 byte] By [GraDoNa] at [2007-11-27 11:25:27]
# 1

Swing related questions should be posted in the Swing forum.

Search the forum before posting a questions

Here is a simple example found in the Swing forum:

http://forum.java.sun.com/thread.jspa?forumID=57&threadID=695964

camickra at 2007-7-29 16:04:31 > top of Java-index,Java Essentials,Java Programming...
# 2

thanks and sorry

GraDoNa at 2007-7-29 16:04:31 > top of Java-index,Java Essentials,Java Programming...