title: Reset counter after last button click + n of seconds
body: <p>I have a simple code for counting button clicks </p>
  
  <pre><code>btn1.addActionListener(new ActionListener() {
      private int counter = 0;
      public void actionPerformed(ActionEvent e) {
          counter++;
          textOutput.setText(String.valueOf(counter));
      }
  }
  </code></pre>
  
  <p>and I want to implement counter reset function after n amount of time (i.e. 1 second) after last button click. </p>
  
  <p>Thank you for any ideas.</p>