Java examples for 2D Graphics:Color
make Transparent Color
//package com.java2s; import java.awt.Color; public class Main { public static final Color makeTransparentColor(Color color, float transparency) { return new Color(color.getRed() / 255.0f, color.getGreen() / 255.0f, color.getBlue() / 255.0f, transparency);/* w ww .j ava 2 s . c o m*/ } }