This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How do I add a wait. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How do I add a wait." Watch "How do I add a wait." New topic
Author

How do I add a wait.

Fritz Largosa
Ranch Hand

Joined: Sep 12, 2005
Posts: 70
I am wanting to pause between two lines of code for a few seconds. I used this.wait(1000); but it doesn't work. Is there a way to put a wait in between two lines of code? Thanks,
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
You should do something like this.

Fritz Largosa
Ranch Hand

Joined: Sep 12, 2005
Posts: 70
works great, thanks.
 
Consider Paul's rocket mass heater.
 
subject: How do I add a wait.