How to remove the stored alpha value ?
protected void paintBackground(Graphics g) {
try {
XYRect myExtent = getExtent();
int color = g.getColor();
int alpha = g.getGlobalAlpha();
g.setGlobalAlpha(0xCC);
g.setColor(0x000000);
g.fillRoundRect(0, 0, myExtent.width, myExtent.height, 30, 30);
g.setColor(color);
g.setGlobalAlpha(alpha);
} catch (Exception e) {
System.out.println(e.toString());
}
}
I have created the transparent screen using the above code but when I am changing focus (i.e I am moving the focus from one to another field ) at that time the transparency looses.
|