Originally Posted by
copeg
Again, I will point you back to the API - JOptionPane.NO_OPTION is defined as 1...and I will leave it up to you to look up what JOptionPane.YES_OPTION is defined as (hint: the other value you are receiving). The page I linked to above has demo code...all you need is to check that the returned API is equal to the values you expect (NO_OPTION, etc...)
int myConfirmDialog = JOptionPane.showConfirmDialog(all your parameters go here);
now, this integer "myConfirmDialog" stores a number which corresponds to the button clicked. the first button will be numbered 0, the second will be numbered 1, the third will be numbered 2 and so on. if you click the first button, myConfirmDialog will have the value 0. using if...else you can add event handling.