Vector add = new Vector(); Object[] setlist = sets.getSelectedValues(); for (int i = 0; i < setlist.length; i++) { add.add(setlist[i]); } pc.setTilesets(add);
pc.setTileset((TileSet) sets.getSelectedValue());
    public void valueChanged(ListSelectionEvent e) {        Vector add = new Vector();        Object[] setlist = sets.getSelectedValues();        for (int i = 0; i < setlist.length; i++) {            add.add(setlist[i]);        }        pc.setTilesets(add);    }