m_yAttBox.setSelectedIndex(1);
if (xAttNames.size() > 1) { m_yAttBox.setSelectedIndex(1); }
  public void setInstances(Instances inst) throws Exception {    if (inst.numAttributes() < 3) {      throw new Exception("Not enough attributes in the data to visualize!");    }    m_trainingInstances = inst;    // setup combo boxes    String [] classAttNames = new String [m_trainingInstances.numAttributes()];    Vector xAttNames = new Vector();    Vector yAttNames = new Vector();    for (int i = 0; i < m_trainingInstances.numAttributes(); i++) {      classAttNames[i] = m_trainingInstances.attribute(i).name();      if (m_trainingInstances.attribute(i).isNominal()) {	classAttNames[i] += " (Nom)";      } else {	classAttNames[i] += " (Num)";      }      if (m_trainingInstances.attribute(i).isNumeric()) {	xAttNames.addElement("X: "+classAttNames[i]);	yAttNames.addElement("Y: "+classAttNames[i]);      }    }    m_classAttBox.setModel(new DefaultComboBoxModel(classAttNames));    m_xAttBox.setModel(new DefaultComboBoxModel(xAttNames));    m_yAttBox.setModel(new DefaultComboBoxModel(yAttNames));    m_yAttBox.setSelectedIndex(1);    m_classAttBox.addActionListener(new ActionListener() {	public void actionPerformed(ActionEvent e) {	  setUpClassValuesBoxes();	}      });    m_xAttBox.addItemListener(new ItemListener() {	public void itemStateChanged(ItemEvent e) {	  if (e.getStateChange() == ItemEvent.SELECTED) {	    computeBounds();	    repaint();	  }	}      });    m_yAttBox.addItemListener(new ItemListener() {	public void itemStateChanged(ItemEvent e) {	  if (e.getStateChange() == ItemEvent.SELECTED) {	    computeBounds();	    repaint();	  }	}      });    computeBounds();    revalidate();    repaint();  }