} if (source == browseButton) {
} else if (source == browseButton) {
    public void actionPerformed(ActionEvent event) {        Object source = event.getSource();        if (source == okButton) {            newTileset = new TileSet();            newTileset.setName(tilesetName.getText());            if (tilebmpCheck.isSelected()) {                String file = tilebmpFile.getText();                int spacing = tileSpacing.intValue();                try {                    newTileset.importTileBitmap("file://"+file,                            map.getTileWidth(), map.getTileHeight(), spacing,                            tileAutoCheck.isSelected());                } catch (Exception e) {                    JOptionPane.showMessageDialog(this,                        e.getMessage(), "Error while importing tileset",                        JOptionPane.ERROR_MESSAGE);                    newTileset = null;                }            }            dispose();        } if (source == browseButton) {            JFileChooser ch = new JFileChooser();            int ret = ch.showOpenDialog(this);            if (ret == JFileChooser.APPROVE_OPTION) {                tilebmpFile.setText(ch.getSelectedFile().getAbsolutePath());            }        } else {            dispose();        }    }