Can anyone help me figure why b) is not the correct answer? I answered b) and c). Thanks, ------------------ Which of the following describe the sequence of method calls that result in a component being redrawn? a) invoke paint() directly b) invoke update which calls paint() c) invoke repaint() which invokes update(), which in turn invokes paint() d) invoke repaint() which invokes paint directly
Maybe the question could ask "What is the correct/usual/preferred way to..." Then the answer is (c). I understand that update is called by the windowing system and one should only call repaint() and let the AWT do the rest. The latter can, for example, consolidate a lot of repaint requests in one update.
Tony Alicea Senior Java Web Application Developer, SCPJ2, SCWCD
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
Gift giving made easy with the permaculture playing cards