to draw a blank image
Hello, my target is to draw a blank jpg image with established width and height.
This is my code:
publicvoid drawShape(int w,int h){
Graphics2D myG2D;
BufferedImage bImg =new BufferedImage( w, h, BufferedImage.TYPE_INT_ARGB );
File imgFile =new File("C:\\Documents and Settings\\m.lipreri\\Desktop\\bombs\\test.jpg");
myG2D = bImg.createGraphics();
myG2D.setBackground(Color.WHITE);
myG2D.setColor( Color.WHITE );
try{
ImageIO.write( bImg,"jpg", imgFile );
}catch ( IOException e ){
e.printStackTrace();
}
}
all the time i find out an image with width = w and heght = h but with color background BLACK. Why? thx

