set Color Alpha - Java 2D Graphics

Java examples for 2D Graphics:Color Alpha

Description

set Color Alpha

Demo Code


//package com.java2s;
import java.awt.*;

public class Main {
    public static Color setAlpha(Color c, int a) {
        return new Color(c.getRed(), c.getGreen(), c.getBlue(), a);
    }//from   w w w . ja  v  a 2  s  .co m
}

Related Tutorials