How to dispose all the jframes and their contents?
<p>I want to have logout functionality in java application, I am using some timers in my application. I want to dispose all the jframes, their contents and stop all timers when i click on logout button. And after pressing logout button the main jframe should disappear and login screen should appear with fresh memory.</p>

<p>I have tried to dispose my jframes and make them visible false and make login screen visible.
All the stuff works well but the previous timers are not stopped and application is using more memory. </p>
