0 replies on 1 page.
Do you own a copy of The Pragmatic Programmer? Have you ever been to a Dave Thomas talk at a developer conference? Then you no doubt have seen the following snippet of Java code (p.173):
paint(g); invalidate(); validate(); revalidate(); repaint(); paintImmediately(r); Here it looks like Fred is desperately trying to get something out on the screen. ...
paint(g); invalidate(); validate(); revalidate(); repaint(); paintImmediately(r);
Here it looks like Fred is desperately trying to get something out on the screen. ...
Q: Can a valid Swing program be written that contains the above lines of code? (No trick answers.)
Q: In which Swing classes or interfaces are each of the above methods defined?
Q: What are the legitimate use cases of each of the methods?
Read: Friday Java Quiz: Accidents Of Implementation