Java examples for 2D Graphics:Color
Change Color Transparency
//package com.java2s; import java.awt.*; public class Main { public static Color ChangeTransparency(Color c, double n) { return new Color(c.getRed(), c.getGreen(), c.getBlue(), (int) (n * 255)); }// ww w . j a va 2 s. c o m }