To solve your problem, you need to change the BufferedImage type of
private BufferedImage image = new BufferedImage(WIDTH, HEIGHT,
BufferedImage.TYPE_3BYTE_BGR);
and change it to
private BufferedImage image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);
the problem is that BufferedImage.TYPE_3BYTE_BGR
uses byte[3] to represent each pixel and
BufferedImage.TYPE_INT_RGB
just uses an int