check.java

来自「新闻系统  此系统是用struts+spring+hibernate开发的 」· Java 代码 · 共 17 行

JAVA
17
字号
package com.news.utils;

import java.awt.Color;
import java.util.Random;

public class Check {
	public Color getRandColor(int fc,int bc){
        Random random = new Random();
        if(fc>255) fc=255;
        if(bc>255) bc=255;
        int r=fc+random.nextInt(bc-fc);
        int g=fc+random.nextInt(bc-fc);
        int b=fc+random.nextInt(bc-fc);
        return new Color(r,g,b);
        }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?