run method « Development « Java Swing Q&A





1. Problems with my run() method.    coderanch.com

I think he expects the programm to repaint every 20ms, but he only sees it painting once. From what i've learned, even if you call repaint() every 20ms, it wont actually do any painting unless something needs to be repainted. If everything still is painted correctly, as it was 20ms ago, it wont repaint.

2. A problem with the run method of java.awt.EventDispatchThread    coderanch.com

Well, if you get an exception then you should find the cause (from the stack trace) and solve it. But I think that using an unchecked exception instead of a checked exception just so you won't have to catch it is bad design. If the exception comes from some outside-world environment where you don't have much control over (like the file ...