d.show();
d.setVisible(true);
    private void newTile() {        if (tileset.usesSharedImages()) {            TileImageDialog d = new TileImageDialog(this, tileset);            d.show();            if (d.getImageId() >= 0) {                currentTile = new Tile(tileset);                currentTile.setImage(d.getImageId());                currentTile.setImageOrientation(d.getImageOrientation());                tileset.addNewTile(currentTile);                queryTiles();            }            return;        }        File files[];        JFileChooser ch = new JFileChooser(location);        ch.setMultiSelectionEnabled(true);        BufferedImage image = null;        int ret = ch.showOpenDialog(this);        files = ch.getSelectedFiles();        for (int i = 0; i < files.length; i++) {            try {                image = ImageIO.read(files[i]);                // TODO: Support for a transparent color            } catch (Exception e) {                JOptionPane.showMessageDialog(this, e.getMessage(),                        "Error!", JOptionPane.ERROR_MESSAGE);                return;            }            Tile newTile = new Tile(tileset);            newTile.setImage(image);            tileset.addNewTile(newTile);        }        if (files.length > 0) {            location = files[0].getAbsolutePath();        }        queryTiles();    }