|
|
|
||||||||||||||||||
|
java.awt
Code Samples Index These code examples and other materials are subject to Sun Microsystems, Inc. Legal Terms
Drawing with Alpha
drawGraphic1(g2d);
// Set alpha. 0.0f is 100% transparent and 1.0f is
// 100% opaque.
float alpha = .7f;
g2d.setComposite(
AlphaComposite.getInstance(
AlphaComposite.SRC_OVER, alpha));
drawGraphic2(g2d);
|