List of usage examples for weka.gui.arffviewer ArffTable ArffTable
public ArffTable(TableModel model)
From source file:meka.gui.modelviewer.renderers.InstancesRenderer.java
License:Open Source License
/** * Performs the actual rendering.//from w w w . j a v a 2s .c om * * @param obj the object to render * @param panel the panel to render into * @return null if successful, otherwise error message */ @Override protected String doRender(Object obj, JPanel panel) { ArffTable table; Instances data; data = (Instances) obj; // bug in weka, cannot render empty dataset if (data.numInstances() == 0) return new PlainTextRenderer().render(obj, panel); table = new ArffTable(new ArffSortedTableModel(data)); panel.add(new BaseScrollPane(table), BorderLayout.CENTER); return null; }