I created an image with the following code:
Code:
int pix[] = null;
Image image = createImage(new MemoryImageSource(width, height,
						ColorModel.getRGBdefault(),
						pix, 0, width));
it's working fine,
but when I try to draw within the image using the Graphics object... it's gives me an error at the method

image.getGraphics();

so... I'm currently using this code to fix the situation:

Code:
        try {
            image = ImageIO.read(new java.io.File("blank.bmp")); 
        } catch (Exception ex) {
        }
Using a blank bmp to load the initial image... the reason I need to load it without a file is that I need to specify the width and height of the new image...!

I need my project done by midnight... any help before that time will greatly be appreciated... if not then I'll resolve to this file load patch...