this.tile = new BufferedImage(40, 20, BufferedImage.TYPE_INT_RGB);
Graphics2D tileg2d = tile.createGraphics();
tileg2d.setBackground(Color.WHITE);
tileg2d.clearRect(0, 0, tile.getWidth(), tile.getHeight());
tileg2d.setColor(Color.BLUE);
tileg2d.fillOval(2, 2, tile.getWidth() - 2, tile.getHeight() - 2);
tileg2d.dispose();
Rectangle2D rect = new Rectangle2D.Double(
2, 2,
tile.getWidth() / 2.0, tile.getHeight() / 2.0);
this.paint = new TexturePaint(tile, rect);