Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
keypressed problems in java
Name: Neal Date: January 31, 2009 at 07:28:16 Pacific OS: Windows Vista Subcategory: Java
Comment:
Hi, I have written a game in Java in which the player can move a character using WASD. The problem I am having is that every now and then one of they keys will 'stick'. whenever a keypressed event occurs it is checked againt the control keys and a boolean is set to true if one of them has been pressed, and on a keyreleased event it is set to false. The problem seems worse on slower machines so I think the problem is that it is missing keyreleased events sometimes due to the high number of key events. There are very many because every time the keyboard automatically repeats a key press for the user when they hold a key down it generates a new keypressed event, which floods the key processor. Does anybody know a way that I can just get it to report the first time a key is pressed to take the strain off the game? Or perhaps something else that may be causing this? Thanks
Summary: i have a problem using java to create a program to determine if it is a prime or not. And also a palindrome code. Can you help me with this? ran ...
Summary: Hello, I'm trying to write a program in JAVA, to calculate the number of integer values entered as a string by the user and work out the average of numbers. The final output should display the numbers...
Summary: hello, i have 2 text files, one is small (file_1: about 200 lines) and the other is fairly large (file2: 12 k - 20 k lines). file_1: tango 12 beta 256 alpha 1700 tango 1200 file_2: tango 12 tango 125 ...