Java Random Color GetRandomColor()

Here you can find the source of GetRandomColor()

Description

Get Random Color

License

Apache License

Declaration

public static String GetRandomColor() 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.HashMap;
import java.util.Map;
import java.util.Random;

public class Main {
    static Map<Integer, String> dictionary = new HashMap<Integer, String>();

    public static String GetRandomColor() {
        Random rand = new Random();
        Integer random = rand.nextInt(17);
        return dictionary.get(random);
    }/*w  w w.ja  va2 s  . c o  m*/
}

Related

  1. getRandColor(int fc, int bc)
  2. getRandom()
  3. getRandomColor()
  4. getRandomColor()
  5. getRandomColor()
  6. getRandomColor()
  7. getRandomColor()
  8. getRandomColor()
  9. getRandomColor()