In a desktop application created using java and spring, the GUI forms are created as singleton beans and therefore whenever a form is displayed, all the preveously entered values are there. Is there a better way to get a fresh form than clearing each form field through java code? Thanks in advance
In a desktop application created using java and spring, the GUI forms are created
Share
I override the
disposemethod and calledinitmethod aftersuper.dispose(), in theinitmethod, added the following line at the begining:getContentPane().removeAll();.It works well for my requirement, when I want the data to remain in the form, I simply hide the form and when I want a fresh form, I dispose the form and show the form again.