Keyboard Scroll Rate

Can anyone help me get rid of the delay when you press and hold a key on the keyboard? im looking for movement similar to the movement in this game ..... http://www.neopets.com/games/draikcastle.phtml .... dont be afraid to click and play. Thanks
[253 byte] By [IIIIIIlla] at [2007-9-28 14:17:35]
# 1

I would think that starting a new Thread or Timer in a keyPressed listener and stopping it in a keyReleased listener and then having a loop (with sleep) in the Timer or Thread would work well.

Another option is to set flags in keyPressed and keyReleased and then using these flags in you animation loop.

bbrittaa at 2007-7-12 10:42:44 > top of Java-index,Other Topics,Java Game Development...
# 2
what would you pass the sleep method in order to get it to stop untill the key is pressed again?
IIIIIIlla at 2007-7-12 10:42:44 > top of Java-index,Other Topics,Java Game Development...