title: To set delay on a button click in java?
body: <p>I have a save button in a <code>JFrame</code> ;on clicking save the 'save' text sets to 'saving....'; I need to set that text as 'saved' after a delay of 10 seconds.How is it possible in java?
  Please help...</p>
  
  <pre><code>try {
      Thread.sleep(4000);
  } catch (InterruptedException e) {
  
      e.printStackTrace();
  }
  </code></pre>
  
  <p>This is what i did...but this wont shows as 'saving' during that delayed time.                      </p>