This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Gregg Bolinger wrote:If the dialog is as simple as you imply, just dispose of it when you are done and create a new instance when you need it.
I am with Gregg here.
You will find this easier, especially if you are using the JOptionPane.showXXX methods to create the dialog. It can still be done with JOptionPane but that would mean unnecessary complications and more lines of code which in my opinion is not worth the effort. Easiest would be provide a new instance of your input field, which would be 1 line of code.