private void setMenu() {
    boolean			isNumeric;
    boolean			hasColumns;
    boolean			hasRows;
    boolean			attSelected;
    ArffSortedTableModel	model;
    boolean			isNull;
    
    model       = (ArffSortedTableModel) m_TableArff.getModel();
    isNull      = (model.getInstances() == null);
    hasColumns  = !isNull && (model.getInstances().numAttributes() > 0);
    hasRows     = !isNull && (model.getInstances().numInstances() > 0);
    attSelected = hasColumns && (m_CurrentCol > 0);
    isNumeric   = attSelected && (model.getAttributeAt(m_CurrentCol).isNumeric());
    
    menuItemUndo.setEnabled(canUndo());
    menuItemCopy.setEnabled(true);
    menuItemSearch.setEnabled(true);
    menuItemClearSearch.setEnabled(true);
    menuItemMean.setEnabled(isNumeric);
    menuItemSetAllValues.setEnabled(attSelected);
    menuItemSetMissingValues.setEnabled(attSelected);
    menuItemReplaceValues.setEnabled(attSelected);
    menuItemRenameAttribute.setEnabled(attSelected);
    menuItemDeleteAttribute.setEnabled(attSelected);
    menuItemDeleteAttributes.setEnabled(attSelected);
    menuItemSortInstances.setEnabled(hasRows && attSelected);
    menuItemDeleteSelectedInstance.setEnabled(hasRows && m_TableArff.getSelectedRow() > -1);
    menuItemDeleteAllSelectedInstances.setEnabled(hasRows && (m_TableArff.getSelectedRows().length > 0));
  }