Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
I am following a tutorial on youtube: Link . There is no error or bugs in my code, so when I run the project The JFrame comes normally but blank. The console pops up and says the following:

Java
<java.lang.IllegalArgumentException: timeout value is negative
at java.lang.Thread.sleep(Native Method)
at Main.GamePanel.run(GamePanel.java:73)
at java.lang.Thread.run(Thread.java:680)


What can I do?
-Naji Awad
Posted
Comments
Sergey Alexandrovich Kryukov 10-Feb-14 16:14pm    
What is unclear in this error message? Use the debugger.
—SA
javaandcpp10 11-Feb-14 8:47am    
I did use the debugger, nothing happened.
Sergey Alexandrovich Kryukov 11-Feb-14 10:23am    
Nothing? If you consider this error message "nothing" why asking your question? :-)
—SA

1 solution

From the error message it looks like somewhere you have a timeout argument with a negative value. You will have to step through your code to find out exactly where this error is thrown then fix the value of the argument.
 
Share this answer
 
Comments
javaandcpp10 11-Feb-14 8:32am    
How do I exactly know where the timeout is a negative value???
BillW33 11-Feb-14 10:06am    
Do you know how to step through the code and examine the value of the variables?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900