fd.show();
fd.setVisible(true);
    public void boardSaveAsImage() {        FileDialog fd = new FileDialog(frame, Messages.getString("BoardEditor.saveAsImage"), FileDialog.SAVE); //$NON-NLS-1$        //        fd.setDirectory("data" + File.separator + "boards");        fd.setLocation(frame.getLocation().x + 150, frame.getLocation().y + 100);        // Add a filter for PNG files        fd.setFilenameFilter(new FilenameFilter() {                public boolean accept(File dir, String name) {                    return (null != name && name.endsWith(".png")); //$NON-NLS-1$                }            });        // use base directory by default        fd.setDirectory("."); //$NON-NLS-1$        // Default to the board's name (if it has one).        String fileName = null;        if (null != curfile && curfile.length() > 0) {            fileName = curfile.toUpperCase();            if (fileName.endsWith(".BOARD")) { //$NON-NLS-1$                int length = fileName.length();                fileName = fileName.substring (0, length-6);            }            fileName = fileName.toLowerCase() + ".png"; //$NON-NLS-1$            fd.setFile (fileName);        }        // Open the dialog and wait for it's return.        fd.show();        if(fd.getFile() == null) {            // I want a file, y'know!            return;        }        curpath = fd.getDirectory();        curfileImage = fd.getFile();        // make sure the file ends in board        if (!curfileImage.toLowerCase().endsWith(".png")) { //$NON-NLS-1$            curfileImage += ".png"; //$NON-NLS-1$        }        frame.setTitle(Messages.getString("BoardEditor.title0") + curfileImage); //$NON-NLS-1$        boardSaveImage();    }