setColourIndex(prefC);
m_ColourCombo.setSelectedIndex(prefC);
  public void setUpComboBoxes(Instances inst) {    setProperties(inst.relationName());    int prefX = -1;    int prefY = -1;    int prefC = -1;    String [] XNames = new String [inst.numAttributes()];    String [] YNames = new String [inst.numAttributes()];    String [] CNames = new String [inst.numAttributes()];    String [] SNames = new String [4];    for (int i = 0; i < XNames.length; i++) {      String type = "";      switch (inst.attribute(i).type()) {      case Attribute.NOMINAL:	type = " (Nom)";	break;      case Attribute.NUMERIC:	type = " (Num)";	break;      case Attribute.STRING:	type = " (Str)";	break;      default:	type = " (???)";      }      XNames[i] = "X: "+ inst.attribute(i).name()+type;      YNames[i] = "Y: "+ inst.attribute(i).name()+type;      CNames[i] = "Colour: "+ inst.attribute(i).name()+type;      if (m_preferredXDimension != null) {	if (m_preferredXDimension.compareTo(inst.attribute(i).name()) == 0) {	  prefX = i;	  System.err.println("Found preferred X dimension");	}      }      if (m_preferredYDimension != null) {	if (m_preferredYDimension.compareTo(inst.attribute(i).name()) == 0) {	  prefY = i;	  System.err.println("Found preferred Y dimension");	}      }      if (m_preferredColourDimension != null) {	if (m_preferredColourDimension.	    compareTo(inst.attribute(i).name()) == 0) {	  prefC = i;	  System.err.println("Found preferred Colour dimension");	}      }    }    m_XCombo.setModel(new DefaultComboBoxModel(XNames));    m_YCombo.setModel(new DefaultComboBoxModel(YNames));    m_ColourCombo.setModel(new DefaultComboBoxModel(CNames));    //m_ShapeCombo.setModel(new DefaultComboBoxModel(SNames));    //m_ShapeCombo.setEnabled(true);    m_XCombo.setEnabled(true);    m_YCombo.setEnabled(true);        if (m_splitListener == null) {      m_ColourCombo.setEnabled(true);      m_ColourCombo.setSelectedIndex(inst.numAttributes()-1);    }    m_plotSurround.setBorder((BorderFactory.createTitledBorder("Plot: "			      +inst.relationName())));    try {      if (prefX != -1) {	setXIndex(prefX);      }      if (prefY != -1) {	setYIndex(prefY);      }      if (prefC != -1) {	setColourIndex(prefC);      }    } catch (Exception ex) {      System.err.println("Problem setting preferred Visualization dimensions");    }  }