if (layerTable.isEditing()) { layerTable.getCellEditor(layerTable.getEditingRow(), layerTable.getEditingColumn()).cancelCellEditing(); }
    private void updateLayerTable() {        int cl = currentLayer;        ((LayerTableModel)layerTable.getModel()).setMap(currentMap);        if (currentMap != null) {            if (currentMap.getTotalLayers() > 0 && cl == -1) {                cl = 0;            }            setCurrentLayer(cl);        }        updateLayerOperations();    }