How to call a method on a period of time in swing?
===

I have a frame with a jtextfield and a jbutton. 
When I press I want to call a method who updates the JTextField`s text at every 4/5/8 seconds.
Could anyone help me with the code ?? (thank you)
    
    The code:    
    
    import javax.swing.*;
    public class Gui{
    JFrame frame = new JFrame();
    public Gui(){

    frame.setLayout(new FlowLayout());

    JTextField tf = new JTextField(10);
    JButton    bu = new JButton("Button");
    
      bu.addActionListener(new ActionListener(){
           
            public void actionPerformed(ActionEvent event){
     
                   for(int i=0;;i++){
                   tf.setText("" + i);
                   }
            }
      });
    }
    }