title: How to handle cancel button in JOptionPane
body: <p>I had created a <code>JOptionPane</code> of type <code>showInputDialog</code>. When it opens it, it shows me two buttons: <kbd>OK</kbd> and <kbd>Cancel</kbd>. I would like to handle the action when I push on <kbd>Cancel</kbd> button, but I don't know how to reach it. How can I get it?</p>