problem with transparency
What i need to do is to draw from a graphics object straight onto a buffered image.
this buffered image must only show what is drawn from the graphics eg a line or circle etc, and everything else has to be transparent.
i have tried this:
int w = this.getWidth();
int h = this.getHeight();
layer =new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = layer.createGraphics();
this.paint(g2);
g2.dispose();
but instead of making a transparent image it makes a kind of gray color (its not the background of a JComponent showing through because i set its background to white).
can anyone help?
thanks

