Here you can find the source of setColorAlpha(Color c, int alpha)
public static Color setColorAlpha(Color c, int alpha)
//package com.java2s; //License from project: Apache License import java.awt.Color; public class Main { public static Color setColorAlpha(Color c, int alpha) { if (alpha > 255 || alpha < 0) return c; return new Color(c.getRed(), c.getGreen(), c.getBlue(), alpha); }/*from w w w .j ava 2s .c om*/ }