• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Quick Java Question!

try{
Thread.currentThread().sleep(100);
}
catch(InterruptedException e)
{
System.exit(1);
} //HOLD ON A SEC YOUNG MAN

Basically I want to add a delay to a black jack applet I'm making, but isn't working. It's worked in a previous program so I'm somewhat confused.

Any ideas?
 
public void drawCards (int[] cards, Graphics g, ImageObserver i, Image c, Player p)
{

for (int loc = 0 ; loc < cards.length ; loc += 2)
{
drawCard (p.getX() + (loc * 25), p.getY(), cards [loc], cards [loc + 1], g, i, c);
p.addCard();
}//im done here
} //drawCards

There's the drawing method that fails!
 
Back
Top