addNewTile(newTile);
addNewTile(newTile);*/
    public void importTileBitmap(String imgFilename,            int tileWidth, int tileHeight, int spacing) throws Exception{        File imgFile = null;        try {            imgFile = new File(imgFilename);            tilebmpFile = imgFile.getCanonicalPath();        } catch (IOException e) {            tilebmpFile = imgFilename;        }		System.out.println("Importing " + imgFilename + "...");        BufferedImage tilebmp = null;		        tilebmp = ImageIO.read(imgFile);        if (tilebmp == null) {            throw new Exception("Failed to load " + tilebmpFile);        }        int iw = tilebmp.getWidth();        int ih = tilebmp.getHeight();        if (iw > 0 && ih > 0) {            for (int y = 0; y <= ih - tileHeight; y += tileHeight + spacing) {                for (int x = 0; x <= iw - tileWidth; x += tileWidth + spacing) {                    BufferedImage tile = new BufferedImage(                            tileWidth, tileHeight,                            BufferedImage.TYPE_INT_ARGB);                    Graphics2D tg = tile.createGraphics();                    tg.drawImage(tilebmp, 0, 0,                            tileWidth, tileHeight,                            x, y, x + tileWidth, y + tileHeight,                            null);					                    Tile newTile = new Tile();                    newTile.setImage(tile);                    addNewTile(newTile);                }            }        }    }