BufferedImage img = new BufferedImage(600, 315, BufferedImage.TYPE_INT_RGB );
for ( int rc = 0; rc < 315; rc++ )
{
for ( int cc = 0; cc < 600; cc++ )
{
img.setRGB(cc, rc, Color.BLACK.getRGB() ); //put color on image
}
}
String path = System.getProperty("user.home");
ImageIO.write(img, "PNG", new File(path+"\\Documents\\NetBeansProjects\\img.png"));
