question about repaint, update and paint# Java - 爪哇娇娃
p*y
1 楼
I am confused what is the relationship between these three.
it seems most of the time, repaint() calls update(), and update()
calls paint().
but sometime we override update() and put all the code for
painting there, without overriding paint(), the graphics just
wouldn't be painted.
I checked the java API for the repaint() description. it seems
sometimes it calls paint() directly, but only when the component
is lightweighted. In all my GUI, i just used AWT, would that
be a problem, i mean maybe t
it seems most of the time, repaint() calls update(), and update()
calls paint().
but sometime we override update() and put all the code for
painting there, without overriding paint(), the graphics just
wouldn't be painted.
I checked the java API for the repaint() description. it seems
sometimes it calls paint() directly, but only when the component
is lightweighted. In all my GUI, i just used AWT, would that
be a problem, i mean maybe t