The easiest way to create a Yes/No/Cancel dialog box is to use showConfirmDialog(Component, Object) method of JOptionPane class.
The following example uses a confirm dialog box with a text message and stores response in the response variable:
int response;
response = JOptionPane.showConfirmDialog(null, "Should i delete all files?");
source: java-tips.org
Sunday, April 18, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment