"DO EVENTS" while looping
Im sure some of you are familiar with the "DO EVENTS" code in visual basic that allows the program to perform other tasks while in a loop. I am looking for the equivalent in java. Is there a way to tell java to continue doing its thing, allow user input and what not while in a loop.
Re: "DO EVENTS" while looping
Re: "DO EVENTS" while looping
Quote:
way to tell java to continue doing its thing, allow user input and what not while in a loop.
Are you talking about using threads to allow multiple streams of execution to proceed in parallel?
Put the stuff you want "java to do" in its own thread and let it run in the background leaving the GUI free to handle user input.
Re: "DO EVENTS" while looping
right well i think more what i was looking for was a thread.yield, but that works to I suppose.
Re: "DO EVENTS" while looping
The Thread class has several methods, yield included.