I coded a simple program where the user distributes 60 points to 8 boxes (Box 1 = 12, Box 2 = 7 etc.). After they press the "Done" button, the values will be stored and a dialog box will appear and ask "Are you sure?".
To this point, everything works, of course. But when I want the program to close if the user presses OK and reset the areas if user says Cancel.
Unfortunately, I don't seem to find a way to do this. So, how do I add an event listener to JOptionPane? I use JOptionPane.showConfirmDialog() to do this, but I fail.