public void paintComponent(final Graphics g)
    {
        System.out.println("modelComponent.paintComponent()");
        /*заполнение слева-направо по строкам*/
        model.apply(new Model.ApplyToCell() {
            @Override
            public void apply(char cell, char box, int i, int j) {
                Dimension dimension = getSize();

                int cellWidth = dimension.width / model.getWidth();
                int cellHeight = dimension.height / model.getHeight();
                int multiplier = 5;
                int shift = 50;
                int x = model.getX();
                int y = model.getY();

                if(i == x && j == y)
                {
                    g.drawImage(person, j*cellWidth, i*cellHeight, (j+1)*cellWidth, (i+1)*cellHeight,
                            0, 0, person.getWidth(), person.getHeight(), null);
                }
                else if('x' == cell)
                {
                    g.drawImage(wall, j*cellWidth, i*cellHeight, (j+1)*cellWidth, (i+1)*cellHeight,
                            shift, shift, shift+cellWidth*multiplier, shift+cellHeight*multiplier, null);
                }
                else if('*' == box)
                {
                    g.drawImage(BOX, j*cellWidth, i*cellHeight, (j+1)*cellWidth, (i+1)*cellHeight,
                            0, 0, BOX.getWidth(), BOX.getHeight(), null);
                }
                else if('&' == cell)
                {
                    g.drawImage(place, j*cellWidth, i*cellHeight, (j+1)*cellWidth, (i+1)*cellHeight,
                            0, 0, cellWidth*multiplier, cellHeight*multiplier, null);
                }
                else
                {
                    g.drawImage(floor, j*cellWidth, i*cellHeight, (j+1)*cellWidth, (i+1)*cellHeight,
                            0, 0, cellWidth*multiplier, cellHeight*multiplier, null);
                }
            }
        });

    }