Since repaint() calls paint(), isn't calling repaint() at the end of the paint() method using recursion endlessly? If so, why am I not getting a stack overflow error?
Asked
Active
Viewed 25 times
1 Answers
0
No, it's not dangerous, since it will just queue in a new paint request. It's actually well known practice when developing small games with swing :) At least it was at my university!

Alexander Haas
- 131
- 6
-
Be careful what you learn at university, their theory is a lot better than their practice. – Kayaman May 29 '18 at 15:16