Here you can find the source of getRamdonColor()
public static int getRamdonColor()
//package com.java2s; import java.util.Random; public class Main { public static int getRamdonColor() { Random random = new Random(System.currentTimeMillis()); final int r = random.nextInt() % 255; final int g = random.nextInt() % 255; final int b = random.nextInt() % 255; int color = (r << 16) | (g << 8) | b; return color; }// w w w. j av a 2s . c om }