I have a JFrame and I have created an object to open it and close it all around my project. This means I am using only one object for that JFrame.
When I call dispose() method to close that frame I expect it to be reset to a new JFrame on next setVisible(true) call. But i can still see the fields filled with value from the previous setVisible(true) call even after i called dispose() on closing it.
How do I flush the stored values from that frame so that I get a new form when i call setVisible(true)?