title: JOptionPane to get password
body: <p><code>JOptionPane</code> can be used to get string inputs from user, but in my case, I want to display a password field in <code>showInputDialog</code>.</p>
  
  <p>The way I need is the input given by the user should be masked and the return value must be in <code>char[]</code>. I need a dialog box with a message, password field, and two buttons. Can that be done? Thanks.</p>