Java examples for 2D Graphics:Color
Get Transparency Mode Of Color
import java.applet.Applet; import java.awt.Color; import java.awt.Graphics; public class Main { public void paint(Graphics g){ Color customColor = new Color(255,10,10); /*from ww w. jav a 2s.com*/ int transparency = customColor.getTransparency(); g.drawString("Transparency mode : " + transparency, 10,50); } }