The usual way that this is done is by using the clip:
g.setColor(bgcolor);
g.fill/draw(the shape);
g.clipRect(0, 0, progressdistance, height);
g.setColor(progresscolor);
g.fill/draw(the shape);
For the purposes of the graphic you posted a link to, you would draw it
once at the beginning unclipped, and then do the fills on top of it -
one unclipped to do the background, and the other clipped to do the
foreground/progress indication...
...jim
===========================================================================
To unsubscribe, send email to lists...@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
lists...@java.sun.com and include in the body of the message "help".