Java Color.getTransparency()
Syntax
Color.getTransparency() has the following syntax.
public int getTransparency()
Example
In the following code shows how to use Color.getTransparency() method.
import java.awt.Color;
//w w w . ja v a 2 s . co m
public class Main {
public static void main(String[] args) {
Color myColor = Color.RED;
System.out.println(myColor.getTransparency());
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »