final long finish = System.currentTimeMillis(); System.out.println("BoardView1: updated screen in " + (finish - start) + " ms.");
    public void update(Graphics g) {        final long start = System.currentTimeMillis();                final Dimension size = getSize();        view = new Rectangle(scroll, size);        		if (!imagesLoading) {			g.drawString("loading images...", 20, 50);			loadAllImages();			return;		} else if (!imagesLoaded) {			imagesLoaded = tracker.checkAll(true);			return;		}        // make sure back buffer is valid        if (backGraph == null || !size.equals(backSize)) {            backSize = size;            backImage = createImage(size.width, size.height);            backGraph = backImage.getGraphics();        }                // make sure board rectangle contains our current view rectangle        if (boardImage == null || !boardRect.union(view).equals(boardRect)) {            updateBoardImage();        }                // draw the board onto the back buffer        backGraph.drawImage(boardImage, 0, 0, this);                // draw onscreen entities        drawSprites(entitySprites);                // draw onscreen attacks        drawSprites(attackSprites);                // draw movement, if valid        if (movementSprite != null) {            drawSprite(movementSprite);        }                // draw cursors        drawSprite(cursorSprite);        drawSprite(highlightSprite);        drawSprite(selectedSprite);                // draw the back buffer onto the screen        g.drawImage(backImage, 0, 0, this);                final long finish = System.currentTimeMillis();        System.out.println("BoardView1: updated screen in " + (finish - start) + " ms.");        //view = " + view);    }