title: how to set Jframe for 5 second
body: <p>I'm using <code>netbeans 7.1.1,</code> to create a JFrame. I want to automatically dispose the <code>JFrame</code> 5 seconds after calling <code>setVisible()</code> . How can I do this?</p>