How come I will be able to see the execution of line 1 and line 3 first before seeing the execution of line 2. I tried to "sleep" the applet after line 2, hoping to see the effect of square.repaint()incase it takes time to repaint, but it will still sleep then I can see the words "after testing" in textarea (execution of line 3) and only later will I see the effect of repaint() of the particular canvas.
Why is this so, is it because I am not optimizing my codes properly or because all directions of applet will be executed first and execution of canvas is done later.
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.