Index: tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/preferences/LexicalTablePreferences.java
===================================================================
--- tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/preferences/LexicalTablePreferences.java	(revision 2671)
+++ tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/preferences/LexicalTablePreferences.java	(revision 2672)
@@ -42,6 +42,7 @@
 		super.initializeDefaultPreferences();
 		Preferences preferences = this.getDefaultPreferencesNode();
 		preferences.putInt(F_MIN, 2);
+		preferences.putInt(F_MAX, Integer.MAX_VALUE);
 		preferences.putInt(V_MAX, 200);
 		preferences.putBoolean(USE_ALL_OCCURRENCES, true);
 		preferences.putBoolean(EXTERN_DATA, false);
Index: tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/statsengine/data/ILexicalTable.java
===================================================================
--- tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/statsengine/data/ILexicalTable.java	(revision 2671)
+++ tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/statsengine/data/ILexicalTable.java	(revision 2672)
@@ -163,7 +163,7 @@
 	 *
 	 * @param nlines the number of lines to keep
 	 */
-	public abstract void cut(int nlines);
+	public abstract void cut(int before, int after);
 	
 	/**
 	 * Filter.
@@ -172,7 +172,7 @@
 	 * @param nlines the nlines
 	 * @param fmin the fmin
 	 */
-	public abstract void filter(int nlines, int fmin) throws Exception;
+	public abstract void filter(int nlines, int fmin, int fmax) throws Exception;
 	
 	/**
 	 * Sets the order.
Index: tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java
===================================================================
--- tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java	(revision 2671)
+++ tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java	(revision 2672)
@@ -41,18 +41,17 @@
  * @author sjacquot
  * 
  */
-// TODO: SJ: add a fMax filter
 public class LexicalTable extends TXMResult implements RResult {
 	
 	public static Integer LEXICALTABLE_COUNTER = new Integer(1);
 	
 	public static String SYMBOL_BASE = "LexicalTable_"; //$NON-NLS-1$
 	
-	/** stores the data computed */
+	/** stores the computed data */
 	protected ILexicalTable statsData;
 	
 	/**
-	 * The property.
+	 * The word property.
 	 */
 	@Parameter(key = TXMPreferences.UNIT_PROPERTY)
 	private WordProperty property;
@@ -64,8 +63,14 @@
 	private int fMinFilter;
 	
 	/**
-	 * Maximum number of lines.
+	 * Maximum frequency.
 	 */
+	@Parameter(key = TXMPreferences.F_MAX)
+	private int fMaxFilter;
+	
+	/**
+	 * Maximum number of lines spinner.
+	 */
 	@Parameter(key = TXMPreferences.V_MAX)
 	private int vMaxFilter;
 	
@@ -119,7 +124,7 @@
 			this.statsData = new LexicalTableImpl(matrix, rowNames, colNames);
 		}
 		catch (Exception e) {
-			e.printStackTrace();
+			Log.printStackTrace(e);
 		}
 	}
 	
@@ -138,7 +143,7 @@
 			this.statsData = new LexicalTableImpl(matrix, rowNames, colNames);
 		}
 		catch (Exception e) {
-			e.printStackTrace();
+			Log.printStackTrace(e);
 		}
 	}
 	
@@ -156,7 +161,7 @@
 			this.statsData = new LexicalTableImpl(matrix, rowNames, colNames);
 		}
 		catch (Exception e) {
-			e.printStackTrace();
+			Log.printStackTrace(e);
 		}
 	}
 	
@@ -166,8 +171,7 @@
 			this.property = this.getCorpus().getProperty(this.getStringParameterValue(TBXPreferences.UNIT_PROPERTY));
 		}
 		catch (CqiClientException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
+			Log.printStackTrace(e);
 			return false;
 		}
 		return true;
@@ -198,7 +202,8 @@
 		ArrayList<String> filteredForms = new ArrayList<>();
 		// create a copy and filter line with Fmin;
 		for (int i = 0; i < corpusLexicon.getFreq().length; i++) {
-			if (corpusLexicon.getFreq()[i] >= this.fMinFilter) {
+			int f = corpusLexicon.getFreq()[i];
+			if (this.fMinFilter <= f && f <= this.fMaxFilter) {
 				filteredForms.add(corpusLexicon.getForms()[i]);
 			}
 		}
@@ -324,8 +329,7 @@
 				// System.out.println("reste : "+Arrays.toString(reste));
 			}
 			catch (CqiClientException e) {
-				// TODO Auto-generated catch block
-				org.txm.utils.logger.Log.printStackTrace(e);
+				Log.printStackTrace(e);
 				return null;
 			}
 		}
@@ -335,19 +339,13 @@
 		return new LexicalTableImpl(mat, rownames.toArray(new String[] {}), colnames.toArray(new String[] {}));
 	}
 	
-	
 	@Override
 	protected boolean _compute(TXMProgressMonitor monitor) throws Exception {
 		
 		if (this.pExternData) {
 			return this.statsData != null;
 		}
-		// FIXME: SJ: became useless?
-		// this.statsData = null; // reset frequencies
 		
-		
-		int vMaxFilter = this.vMaxFilter;
-		
 		if (this.parent instanceof Subcorpus) {
 			
 			Subcorpus subcorpus = (Subcorpus) this.parent;
@@ -363,12 +361,6 @@
 		}
 		else if (this.parent instanceof PartitionIndex) {
 			
-			// FIXME: SJ: add 1 to vmax filter to manage the #RESTE# line when computed with corpora margins
-			// need to validate
-			if (this.useAllOccurrences) {
-				vMaxFilter++;
-			}
-			
 			this.statsData = this._computeFromIndexes(Arrays.asList((PartitionIndex) this.parent));
 		}
 		
@@ -377,7 +369,7 @@
 		}
 		
 		// apply filtering
-		this.statsData.filter(vMaxFilter, this.fMinFilter);
+		this.statsData.filter(this.vMaxFilter, this.fMinFilter, this.fMaxFilter);
 		
 		return true;
 	}
@@ -401,6 +393,9 @@
 		if (parameters.containsKey(LexicalTablePreferences.F_MIN)) {
 			this.fMinFilter = parameters.getInteger(LexicalTablePreferences.F_MIN);
 		}
+		if (parameters.containsKey(LexicalTablePreferences.F_MAX)) {
+			this.fMaxFilter = parameters.getInteger(LexicalTablePreferences.F_MAX);
+		}
 		if (parameters.containsKey(LexicalTablePreferences.UNIT_PROPERTY)) {
 			String s = parameters.get(LexicalTablePreferences.UNIT_PROPERTY).toString();
 			this.property = getCorpus().getProperty(s);
@@ -433,8 +428,7 @@
 			}
 		}
 		catch (RWorkspaceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
+			Log.printStackTrace(e);
 		}
 	}
 	
@@ -464,11 +458,11 @@
 			return statsData.getColNames();
 		}
 		catch (Exception e) {
+			Log.printStackTrace(e);
 			return null;
 		}
 	}
 	
-	
 	public ILexicalTable getData() {
 		return statsData;
 	}
@@ -489,14 +483,23 @@
 	}
 	
 	/**
-	 * Gets the maximum frequency filter.
+	 * Gets the minimum frequency filter.
 	 * 
-	 * @return
+	 * @return the minimum frequency filter
 	 */
 	public int getFMinFilter() {
 		return this.fMinFilter;
 	}
 	
+	/**
+	 * Gets the maximum frequency filter.
+	 * 
+	 * @return the maximum frequency filter
+	 */
+	public int getFMaxFilter() {
+		return this.fMaxFilter;
+	}
+	
 	@Override
 	public String getSimpleName() {
 		// if (statsData != null) {
@@ -505,11 +508,10 @@
 			strb.append(property.getName() + " ");
 			try {
 				// strb.append(this.getFMin() + " / " + this.getNRows());
-				strb.append(this.fMinFilter + " / " + this.vMaxFilter);
+				strb.append(this.fMinFilter + "-" + this.fMaxFilter + " / " + this.vMaxFilter);
 			}
 			catch (Exception e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
+				Log.printStackTrace(e);
 				return this.getEmptyName();
 			}
 			return strb.toString();
@@ -521,18 +523,17 @@
 		}
 	}
 	
-	
 	@Override
 	public String getName() {
 		try {
 			return this.getParent().getSimpleName() + ":" + this.getSimpleName(); //$NON-NLS-1$
 		}
 		catch (Exception e) {
+			Log.printStackTrace(e);
 		}
 		return "";
 	}
 	
-	
 	@Override
 	public String getComputingStartMessage() {
 		// from partition index
@@ -592,7 +593,6 @@
 		return CQPCorpus.getFirstParentCorpus(this);
 	}
 	
-	
 	/**
 	 * Gets the parent partition of this lexical table.
 	 * 
@@ -628,7 +628,6 @@
 		}
 	}
 	
-	
 	/**
 	 * Gets the maximum number of lines filter.
 	 * 
@@ -658,6 +657,15 @@
 	}
 	
 	/**
+	 * Sets the maximum frequency filter.
+	 * 
+	 * @param fMax
+	 */
+	public void setFMaxFilter(int fMin) {
+		this.fMaxFilter = fMin;
+	}
+	
+	/**
 	 * see LexicalTablePreferences.PROPERTY, LexicalTablePreferences.F_MIN, LexicalTablePreferences.V_MAX and LexicalTablePreferences.USEALLOCCURENCES
 	 */
 	// public boolean setParameters(TXMParameters parameters) {
@@ -709,13 +717,16 @@
 	}
 	
 	
-	public void setParameters(WordProperty prop, Integer fmin, Integer vmax, Boolean useAllOccurrences) {
+	public void setParameters(WordProperty prop, Integer fmin, Integer fmax, Integer vmax, Boolean useAllOccurrences) {
 		if (prop != null) {
 			this.property = prop;
 		}
 		if (fmin != null) {
 			this.fMinFilter = fmin;
 		}
+		if (fmax != null) {
+			this.fMaxFilter = fmax;
+		}
 		if (vmax != null) {
 			this.vMaxFilter = vmax;
 		}
@@ -725,7 +736,6 @@
 		this.dirty = true;
 	}
 	
-	
 	/**
 	 * @param useAllOccurrences the useAllOccurrences to set
 	 */
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java	(revision 2671)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java	(revision 2672)
@@ -85,7 +85,7 @@
 			// In not, clean and simplify the code
 			List<PartitionIndex> partitionIndexes = ((IStructuredSelection) HandlerUtil.getCurrentSelection(event)).toList();
 			
-			ArrayList<String> choices = new ArrayList<String>();
+			ArrayList<String> choices = new ArrayList<>();
 			choices.add(LexicalTableUIMessages.useAllOccurrences);
 			choices.add(LexicalTableUIMessages.userIndexOccurrences);
 			ListDialog dialog = new ListDialog(window.getShell());
@@ -146,7 +146,12 @@
 			lexicalTable.setUnitProperty(property);
 			// transmit index fmin/fmax parameters
 			lexicalTable.setFMinFilter(firstIndex.getFilterFmin());
-			lexicalTable.setVMaxFilter(firstIndex.getFilterVmax());
+			if (useAllOccurrences) {
+				lexicalTable.setVMaxFilter(firstIndex.getFilterVmax() + 1); // the #REST line is added, we need to add a line to vmax
+			}
+			else {
+				lexicalTable.setVMaxFilter(firstIndex.getFilterVmax());
+			}
 			
 			
 			
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 2671)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 2672)
@@ -147,6 +147,12 @@
 	protected Spinner fMinSpinner;
 	
 	/**
+	 * Minimum frequency filter spinner.
+	 */
+	@Parameter(key = LexicalTablePreferences.F_MAX)
+	protected Spinner fMaxSpinner;
+	
+	/**
 	 * Maximum numbers of lines spinner.
 	 */
 	@Parameter(key = LexicalTablePreferences.V_MAX)
@@ -162,7 +168,7 @@
 	public void _createPartControl() {
 		
 		try {
-			lexicalTable = (LexicalTable) this.getResult();
+			lexicalTable = this.getResult();
 			
 			// Main parameters
 			GLComposite mainParametersArea = this.getMainParametersComposite();
@@ -223,8 +229,9 @@
 			
 			
 			// thresholds
-			ThresholdsGroup thresholdsGroup = new ThresholdsGroup(this.getExtendedParametersGroup(), SWT.NONE, this, true, false);
+			ThresholdsGroup thresholdsGroup = new ThresholdsGroup(this.getExtendedParametersGroup(), SWT.NONE, this, true, true);
 			this.fMinSpinner = thresholdsGroup.getFMinSpinner();
+			this.fMaxSpinner = thresholdsGroup.getFMaxSpinner();
 			this.vMaxSpinner = thresholdsGroup.getVMaxSpinner();
 			this.vMaxSpinner.setMinimum(1);
 			
@@ -236,11 +243,11 @@
 				@Override
 				public void widgetSelected(SelectionEvent e) {
 					StatusLine.setMessage(LexicalTableUIMessages.mergingLines);
-					ArrayList<Object> selection = new ArrayList<Object>();
-					MergeDeleteDialog d = new MergeDeleteDialog(e.display.getActiveShell(), new ArrayList<Object>(collist), selection, -1);
+					ArrayList<Object> selection = new ArrayList<>();
+					MergeDeleteDialog d = new MergeDeleteDialog(e.display.getActiveShell(), new ArrayList<>(collist), selection, -1);
 					
 					if (d.open() == Window.OK) {
-						List<Integer> colindices = new ArrayList<Integer>();
+						List<Integer> colindices = new ArrayList<>();
 						for (int i = 0; i < collist.size(); i++) {
 							if (selection.contains(collist.get(i))) {
 								colindices.add(i);
@@ -284,7 +291,7 @@
 							lexicalTable.getData().removeCols(coltodelete);
 							lexicalTable.setAltered();
 							// refresh stuff
-							collist = new ArrayList<Object>();// update col name
+							collist = new ArrayList<>();// update col name
 							// list
 							try {
 								for (String colname : lexicalTable.getColNames().asStringsArray()) {
@@ -311,7 +318,7 @@
 							lexicalTable.getData().removeCols(colindices);
 							lexicalTable.setAltered();
 							
-							collist = new ArrayList<Object>();
+							collist = new ArrayList<>();
 							Vector colnames = lexicalTable.getColNames();
 							try {
 								for (String colname : colnames.asStringsArray()) {
@@ -345,7 +352,7 @@
 				@Override
 				public void widgetSelected(SelectionEvent e) {
 					
-					ArrayList<Object> selection = new ArrayList<Object>();
+					ArrayList<Object> selection = new ArrayList<>();
 					MergeDeleteDialog d = new MergeDeleteDialog(e.display
 							.getActiveShell(), new ArrayList<Object>(rows),
 							selection, -1);
@@ -450,6 +457,7 @@
 		}
 	}
 	
+	@Override
 	public void setContentDescription(String desc) {
 		infoLine.setText(desc);
 		infoLine.update();
@@ -490,7 +498,7 @@
 		
 		try {
 			
-			collist = new ArrayList<Object>();
+			collist = new ArrayList<>();
 			
 			if (this.lexicalTable.getProperty() != null) {
 				unitColumn.getColumn().setText(this.lexicalTable.getProperty().getName());
