pattern2D = new BufferedImage(4, 4, BufferedImage.TYPE_INT_RGB);
pattern2D = new BufferedImage(4, 4, BufferedImage.TYPE_INT_ARGB);
  static void initializePattern(Color light, Color dark)  {    pattern2D = new BufferedImage(4, 4, BufferedImage.TYPE_INT_RGB);    lightColor = light;    darkColor = dark;    Graphics g = pattern2D.getGraphics();    g.setColor(light);    g.fillRect(0, 0, 1, 1);    g.fillRect(2, 2, 1, 1);    g.setColor(dark);    g.fillRect(1, 1, 1, 1);    g.fillRect(3, 3, 1, 1);    g.dispose();  }