m_ClassCombo.setSelectedIndex(attribNames.length - 1); m_ClassCombo.setEnabled(true);
if (attribNames.length > 0) { m_ClassCombo.setSelectedIndex(attribNames.length - 1); m_ClassCombo.setEnabled(true); m_StartBut.setEnabled(m_RunThread == null); m_StopBut.setEnabled(m_RunThread != null); } else { m_StartBut.setEnabled(false); m_StopBut.setEnabled(false); }
  public void setInstances(Instances inst) {        m_Instances = inst;    String [] attribNames = new String [m_Instances.numAttributes()];    for (int i = 0; i < attribNames.length; i++) {      String type = "";      switch (m_Instances.attribute(i).type()) {      case Attribute.NOMINAL:	type = "(Nom) ";	break;      case Attribute.NUMERIC:	type = "(Num) ";	break;      case Attribute.STRING:	type = "(Str) ";	break;      default:	type = "(???) ";      }      attribNames[i] = type + m_Instances.attribute(i).name();    }    m_StartBut.setEnabled(m_RunThread == null);    m_StopBut.setEnabled(m_RunThread != null);    m_ClassCombo.setModel(new DefaultComboBoxModel(attribNames));    m_ClassCombo.setSelectedIndex(attribNames.length - 1);    m_ClassCombo.setEnabled(true);  }