When you get an exception using a method, you need to go into the API doc and read the description of why the method throws the exception. Have you done that? Do you have any questions about what...
Type: Posts; User: Norm
When you get an exception using a method, you need to go into the API doc and read the description of why the method throws the exception. Have you done that? Do you have any questions about what...
Please post the code that is getting the exception and the full text of the error message.
See post #15:
You normally do not call the run() method. That is done by the thread when it starts executing a Runnable.
The run() method does not return to the constructor so it can return to...
Please post a small program (not the whole project) that compiles, executes and shows the problem.
I have not way to open a .rar file.
Do you have some code I can compile, execute and see the problem? Short pieces of code can leave out something important.
You normally do not call the run() method. That is done by the thread...
Can you post more code so we can see the full context of what is happening.
while(true) //infinite loop
Yes that is what I'd expect.
The java program calls the paint()method when it thinks the GUI needs to be redrawn or after the code has called the repaint() method.
You should post the code you are executing when you ask...
How do you know how many times the paint() method is called?
What are your questions or problems?
Time to build up your vocabulary. Google is a good place to start
GUI class - a class that is displayed on the monitor like JFrame or JButton
JVM - Java Virtual Machine. The java program that...
What class is the paint() method in? If its in a GUI class, the JVM will call it every time the GUI needs to be drawn or after the code calls repaint().
Canvas is the name of a Java SE class. You...