i need help =(
the problem i have is regarding the threading that i've used, in a form. i use a CustomItem class and input the threading codes inside. everyone works fine, animation moved.
but the problem is its too FAST!
this is my threading class in my CustomeItem class.Code:class AliceThread extends Thread{ public void run(){ while (true) { try{ sleep(300); }catch(InterruptedException ie) { ie.printStackTrace(); } x -= 20; if(x <= 0 - image.getWidth()) x = getWidth(); } } }
i understand that the sleep() method is the speed, but whatever value i input, it always is very fast.
is it something to do with the repaint or anything?
thanks in advance ^^

Reply With Quote



