Here you can find the source of getRandomColor()
private static Color getRandomColor()
//package com.java2s; //License from project: Artistic License import java.awt.Color; import java.util.Random; public class Main { private static Random random = new Random(); private static Color getRandomColor() { int red = random.nextInt(225); int green = random.nextInt(225); int blue = random.nextInt(225); return new Color(red, green, blue); }//from www .j a va 2s. c om }