if(TiledConfiguration.getInstance().keyHasValue("tiled.cursorhighlight", 1)) { Rectangle redraw = cursorHighlight.getBounds(); cursorHighlight.setOffset(tile.x, tile.y); mapView.repaintRegion(new Rectangle(Math.min(tile.x, redraw.x)-1, Math.min(tile.y, redraw.y)-1, Math.max(tile.x, redraw.x)+1, Math.max(tile.y, redraw.y)+1)); }
    public void mouseMoved(MouseEvent e) {        if (bMouseIsDown) {            doMouse(e);        }        Point tile = mapView.screenToTileCoords(e.getX(), e.getY());        if (currentMap.inBounds(tile.x, tile.y)) {            tileCoordsLabel.setText("" + tile.x + ", " + tile.y);        } else {            tileCoordsLabel.setText(" ");        }    }