Way, way back in my Delphi and maybe PowerBuilder days, I used key-up events to drive this stuff. I really don't remember why. I do remember it was important to use mouse-up because the user might mouse-down on a button and then drag the mouse off the control as an "oops, I didn't mean to click that" gesture. I just tried that with the "Add Reply" button in my browser and it ignored the eventual mouse up off the button.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Apr 11, 2005
Thanks, but the keyUp / keyDown methods are deprecated. I think I'll just have to modify the keyPressed/keyReleased code so that it doesn't react 50 times incase a key is held down.
Joined: Jan 29, 2003
I'd have to guess keyReleased does what I was thinking of in Key-Up. It's been a long time; I haven't actually done any of this in Java.