thanks i worked it out now
"A Bag Of Memes" <a@b.c> wrote in message
news:vD********************@twister.austin.rr.com. ..
"webster" <tr********@hotmail.com> wrote in message
news:Nj*****************@news-server.bigpond.net.au... I have a whole lot of if statements for checkboxes that play sounds if
they are selected (an example is as follows) but i want a delay between when
each if statement is played. How do i put a time delay between these?
if (checkbox1.isSelected())
Base.play();
if (checkbox2.isSelected())
Base.play();
You can call Thread.sleep() if the code above isn't in the GUI event
handling thread. One possible solution is to add play commands to a queue
and have a dedicated sound playing thread that dequeues commands, plays
sounds and waits between them.