paint using BufferedImage.