title: Java - Creating an image
body: <p>I'm currently working on a game in Java and am trying to create a background without using any image files. The image consists of a square split into 4 triangles, each of which is a different color.</p>
  
  <p>If anyone could point me towards some was of using <code>Graphics2D</code> and then saving it to a <code>BufferedImage</code>, that would be great.</p>