How to periodically poll some value using Java (Swing)?
<p>I am using swing based model.My form contains one Jbutton its called "polling(function name is getvalue())".I have a function name as "getvalue()".This function does retrieve values(this value will change after some span of time) and print it in console. I want code and idea about, that function will call automatically every 5 minutes ( or some span of time interval)and retrieve values and print it in console.I want code using timer concept .</p>

<p>my button function is like</p>

<p>private void ActionPerformed(java.awt.event.ActionEvent evt) 
{</p>

<p>}</p>

<p>where will write my Automatic polling code.</p>
