为啥会这样

为什么会这样?JOptionPane.showConfirmDialog(this, 这是确认框confirm! , ConfirmDlg ,JOptionPane.Y

为什么会这样?
JOptionPane.showConfirmDialog(this, "这是确认框confirm! ", "Confirm   Dlg ",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.INFORMATION_MESSAGE);
我把它放在action中删除程序的最上面,用它弹出确认提示框,但不论我点是,否,还是撤销下面的代码都会被执行,即值被删除???

[解决办法]
have a try
int rst = JOptionPane.showConfirmDialog(this, "这是确认框confirm! ", "Confirm Dlg ",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.INFORMATION_MESSAGE);
if (rst != JOptionPane.YES_OPTION) {
return;
}