Java Random Color getRandomColor()

Here you can find the source of getRandomColor()

Description

get Random Color

License

Open Source License

Declaration

public static Color getRandomColor() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Color;

import java.util.Random;

public class Main {
    public static Color getRandomColor() {
        Random r = new Random();

        Color c = new Color(r.nextInt(255), r.nextInt(255), r.nextInt(255));
        return c;
    }/*  w  ww .  ja  va 2 s .c o m*/
}

Related

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