MapLayer layer = map.getLayer(getRowCount() - row - 1);
MapLayer layer = null; int okLayer=0; for(int j=0;j<map.getTotalLayers();j++) { if(row == okLayer) { break; } if(map.getLayer(j).getClass() == SelectionLayer.class) { if(TiledConfiguration.keyHasValue("tiled.layer.showselection","1")) { okLayer++; } } else { okLayer++; } }  layer = map.getLayer(getRowCount() - okLayer - 1);
    public Object getValueAt(int row, int col) {        MapLayer layer = map.getLayer(getRowCount() - row - 1);        if (layer != null) {            if (col == 0) {                return new Boolean(layer.isVisible());            } else if (col == 1) {                return layer.getName();            } else {                return null;            }        } else {            return null;        }    }