@Override
    public void paintComponent(Graphics graphic) {
        super.paintComponent(graphic);
        Graphics g = backBuffer.getGraphics();
        g.setColor(Color.GREEN);
        g.fillRect(0, 0, GameData.MINIMAP_WIDTH, GameData.MINIMAP_HEIGTH);
        //System.out.println("currentWindowX "+currentWindowX+" currentWindowY " + currentWindowY);
        if (model != null) { 
            synchronized (model) {
                g.setColor(Color.red);
                g.drawRect(convertX(currentWindowX), convertY(currentWindowY),
                convertX(GameData.WINDOW_WIDTH), convertY(GameData.WINDOW_HEIGTH));
                
                for (ModelObject o : model) {
                    if (o instanceof Tank) {
                        Tank tank = (Tank) o;
                        //BufferedImage tmp = new BufferedImage(50, 50, BufferedImage.BITMASK);
                        //Graphics2D g2D =(Graphics2D)tmp.getGraphics();
                        //g2D.drawImage(tankImage,0,0,50,50,null);
                        //g2D.rotate(tank.getRotation(),25,25);
                        //g.drawImage(tmp, tank.getX(), tank.getY() ,50,50, null);
                  /*      AffineTransform tx = AffineTransform.getRotateInstance(
                                tank.getRotation(), tankImage.getWidth() / 2, tankImage.getHeight() / 2);
                        AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR);
                       */
                        g.setColor(Color.BLACK);
                        g.fillOval(convertX(o.getX() - GameData.TANK_SIZE), convertY(o.getY() - GameData.TANK_SIZE),
                                8, 8);
                       

                    }
                    if (o instanceof Grenade) {
                        g.setColor(Color.RED);
                        g.fillOval(convertX(o.getX() - 2), convertY(o.getY() - 2), 4, 4);
                    }
                    if (o instanceof Explosion) {
                        g.setColor(Color.ORANGE);
                        g.fillOval(convertX(o.getX() - 30), convertY(o.getY() - 30), 10, 10);
                    }
                    
                    
                    
                }
            }
        }

        //Graphics2D graphic2d = (Graphics2D) graphic;
        //graphic2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        //      RenderingHints.VALUE_ANTIALIAS_ON);
        graphic.drawImage(backBuffer, 0, 0, this.getWidth(), this.getHeight(), null);

    }