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.