Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
How can I add multiple pauses in my Java program?
I have a Java program where I append text to a JTextArea. I have several lines of appending text and I wish to put a pause in between each one. The problem is when I use the conventional Thread.sleep() method, all the pauses happen at once and then the text gets appended. Why is this and how can I get around it?
2 Answers
- 8 years agoFavorite Answer
just put in a for loop that causes it to sit and count, i believe thats all thread.sleep does
like this:
for(long i=1L; i<=20000000; i++);
don't forget the semi-colon--------^ :)
I hope this helps
- 8 years ago
It would be helpful to see your code. Can you post it pastebin.com?