Vector tilesets = new Vector(); currentMap = map; if (currentMap != null) { tilesets = currentMap.getTilesets(); pc.setTilesets(tilesets);
if (map != null) { Vector tilesets = map.getTilesets();   int prevIndex = sets.getSelectedIndex();
    public void setMap(Map map) {        Vector tilesets = new Vector();        currentMap = map;        if (currentMap != null) {            tilesets = currentMap.getTilesets();            pc.setTilesets(tilesets);            sets.setListData(tilesets);            sets.setSelectedIndex(0);        }    }