Here you can find the source of getRandomColorInString()
public static String getRandomColorInString()
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import java.util.Random; public class Main { public static String getRandomColorInString() { Random numGen = new Random(); return new String(numGen.nextInt(256) + ", " + numGen.nextInt(256) + ", " + numGen.nextInt(256)); }/* ww w . ja v a 2 s . co m*/ }