}
// next color
private void generateNextColor() {
fCurrentColor = new Color(fCurrentColor.red, fCurrentColor.green, fCurrentColor.blue+1);
if (fCurrentColor.blue > 255) {
fCurrentColor = new Color(fCurrentColor.red, fCurrentColor.green+1, 0);
if (fCurrentColor.green > 255) {
fCurrentColor = new Color(fCurrentColor.red+1, 0, 0);
if (fCurrentColor.red > 255) {
fCurrentColor = new Color(0, 0, 0); // reset back to zero
}
}
}
}