Making the changes I suggested I get this image:
Type: Posts; User: Norm
Making the changes I suggested I get this image:
Its a waste of time posting code that does not compile, execute and show the problem.
The posted code would not show the problem. It would get a NPE.
Check the code in paintAgain(). Is this what you want:
if (art == null)
Try removing the Graphics parameter for the paintAgain() method since it is never used.
I based my statement on the above code. It looks like it was coded without defining a variable g and giving that variable a value.
Why does the paintAgain() method need an arg? It looks like it...
Where is the variable: g defined that is in scope (within the same pair of {}s) as where it is being used?
It looks like you are trying to write code without understanding what the different parts...
The paintAgain() method takes a Graphics object for an arg. There is no Graphics object available in the constructor. The paintComponent() method has one. Try calling it from inside the...