im draw a bargraph with this drawing method and the stripes are dark gray. I just wanted to know how to bring this color back when I go back and forth?
is there a color .DEFAULT or something like that? Or should I just setColor before the loop
public void paint(Graphics g) {
super.paint(g);
for (int i = 0, k = 0; i < barsArray.length; i++, k += getWidth()
/ barsArray.length) {
g.fillRect(k + 5, getHeight() - barsArray[i] * 15, getWidth()
/ barsArray.length - 1, getHeight() * 2);
}
}
source
share