Java Transparency BITMASK
Syntax
Transparency.BITMASK has the following syntax.
static final int BITMASK
Example
In the following code shows how to use Transparency.BITMASK field.
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Transparency;
import java.awt.image.BufferedImage;
/*w w w . j a va 2 s . c o m*/
public class Main {
public static void main(String[] argv) throws Exception {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gs = ge.getDefaultScreenDevice();
GraphicsConfiguration gc = gs.getDefaultConfiguration();
BufferedImage bimage = gc.createCompatibleImage(100, 100, Transparency.BITMASK);
}
}
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »