|
Re: query about paint() method in graphics
|
Posted: Apr 4, 2002 7:46 PM
|
|
painting tips :
repaint() does not garauntee any action whatsoever, like calling a painter, he'll come, eventually.
graphics routines should be streamlined - try to separate rendering and calculating as much as possible.
do as much graphics work offscreen as you can.
use g.clip(Spape /*Rectangle usually*/ )to reduce the amount of area that has to be painted.
in Java2 swing classes, override paintComponent(Graphics g)instead of paint(g), or be sure to call super.paint(g) to be sure handle important graphics maintainence.
get lots of books and docs.
good luck ~S~
|
|