
int s = JOptionPane.showConfirmDialog(null, "確定要提交嗎", "提交", JOptionPane.YES_NO_CANCEL_OPTION);
if (s == 0) {
JOptionPane.showMessageDialog(null, "你點(diǎn)的是確定!");
}
if (s == 1) {
JOptionPane.showMessageDialog(null, "你點(diǎn)的是否!");
}
if (s == 2) {
JOptionPane.showMessageDialog(null, "你點(diǎn)的是取消!");
}