getCapabilities().testWithFail(i);   i = new Instances(i); i.deleteWithMissingClass();
  public void buildClassifier(Instances i) throws Exception {    //construct a visualizer    //construct a tree displayer and feed both then do nothing    //note that I will display at the bottom of each split how many     //fall into each catagory        m_classifiers = new GenericObjectEditor(true);    m_classifiers.setClassType(Classifier.class);    m_classifiers.setValue(new weka.classifiers.rules.ZeroR());        ((GenericObjectEditor.GOEPanel)m_classifiers.getCustomEditor())      .addOkListener(new ActionListener() {	  public void actionPerformed(ActionEvent e) {	    //I want to use the focus variable but to trust it I need	    //to kill the window if anything gets changed by either	    //editor	    try {	      m_focus.m_set1 = null;	      m_focus.m_set2 = null;	      m_focus.setInfo(m_focus.m_attrib1, m_focus.m_attrib2, null);	      m_focus.setClassifier((Classifier)m_classifiers.getValue());	      m_classifiers = new GenericObjectEditor();	      m_classifiers.setClassType(Classifier.class);	      m_classifiers.setValue(new weka.classifiers.rules.ZeroR());	      ((GenericObjectEditor.GOEPanel)m_classifiers.getCustomEditor())		.addOkListener(this);	      m_tView = new TreeVisualizer(UserClassifier.this, graph(), 				     new PlaceNode2());	      m_tView.setHighlight(m_focus.m_identity);	      m_reps.setComponentAt(0, m_tView);	      m_iView.setShapes(null);	    } catch(Exception er) {	      System.out.println("Error : " + er);	      System.out.println("Part of user input so had to catch here");	    }	  }	});        m_built = false;    m_mainWin = new JFrame();        m_mainWin.addWindowListener(new WindowAdapter() {	public void windowClosing(WindowEvent e) {	  int well = JOptionPane.showConfirmDialog(m_mainWin, 						   "Are You Sure...\n"						   + "Click Yes To Accept"						   + " The Tree" 						   + "\n Click No To Return",						   "Accept Tree", 						   JOptionPane.YES_NO_OPTION);	  	  if (well == 0) {	    m_mainWin.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);	    blocker(false);	    	  }	  else {	    m_mainWin.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);	  }	}      });        m_reps = new JTabbedPane();    m_mainWin.getContentPane().add(m_reps);                //make a backup of the instances so that any changes don't go past here.    Instances te = new Instances(i, i.numInstances());    for (int noa = 0; noa < i.numInstances(); noa++) {      te.add(i.instance(noa));    }        te.deleteWithMissingClass(); //remove all instances with a missing class    //from training        m_top = new TreeClass(null, 0, 0, m_nextId, 1, te, null);    m_focus = m_top;    //System.out.println(graph());    m_tView = new TreeVisualizer(this, graph(), new PlaceNode1());        m_reps.add("Tree Visualizer", m_tView);    //tree_frame = new JFrame();    //tree_frame.getContentPane().add(m_tView);    //tree_frame.setSize(800,600);    //tree_frame.setVisible(true);        m_tView.setHighlight(m_top.m_identity);    m_iView = new VisualizePanel(this);    //m_iView.setSize(400, 300);    m_iView.setInstances(m_top.m_training);    m_iView.setColourIndex(te.classIndex());    //vis_frame = new JFrame();    //vis_frame.getContentPane().add(m_iView);    //vis_frame.setSize(400, 300);    //vis_frame.setVisible(true);    m_reps.add("Data Visualizer", m_iView);    m_mainWin.setSize(560, 420);    m_mainWin.setVisible(true);    blocker(true);          //a call so that the main thread of     //execution has to wait for the all clear message from the user.        //so that it can be garbage     if (m_propertyDialog != null) {      m_propertyDialog.dispose();      m_propertyDialog = null;    }        //collected    m_classifiers = null;    m_built = true;  }