while(ids.hasMoreElements()) { Image img = tileset.getImageById(ids.nextElement()); if(img != null) listData.add(img);
imageIds = new Object[tileset.getTotalImages()]; for (int i = 0; i < imageIds.length; ++i) { imageIds[i] = ids.nextElement(); Image img = tileset.getImageById(imageIds[i]);  listData.add(img);
    public void queryImages() {        Vector listData = new Vector();        int curSlot = 0;        Enumeration ids = tileset.getImageIds();        while(ids.hasMoreElements()) {            Image img = tileset.getImageById(ids.nextElement());            if(img != null)                listData.add(img);        }        imageList.setListData(listData);        if (imageId != -1) {            imageList.setSelectedIndex(imageId);            imageList.ensureIndexIsVisible(imageId);        }    }