TilePalettePanel panel = (TilePalettePanel) it.next();
TilePaletteQuickPanel panel = (TilePaletteQuickPanel) it.next();
    private void recreateTabs(List tilesets) {        // Stop listening to the tile palette panels        for (Iterator it = tilePanels.iterator(); it.hasNext();) {            TilePalettePanel panel = (TilePalettePanel) it.next();            panel.removeTileSelectionListener(this);        }        tilePanels.clear();        // Remove all tabs        removeAll();        if (tilesets != null) {            // Add a new tab for each tileset of the map            for (Iterator it = tilesets.iterator(); it.hasNext();)            {                TileSet tileset = (TileSet) it.next();                if (tileset != null) {                    addTabForTileset(tileset);                }            }        }    }