1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
/*
*
*/
package plams.ui.comp.trace;
import java.util.Date;
import javax.swing.table.DefaultTableModel;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
/**
* @author plams
* This frame contains the scores from LDAP
*/
public class ScoreFrame extends JFrame {
private JTable _table;
private JScrollPane _scr;
private DefaultTableModel _model;
public ScoreFrame() {
super("Recognized words", true, false, true, true);
_model = new DefaultTableModel() {
boolean[] canEdit = new boolean[] { false, false, false };
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit[columnIndex];
}
};
_table = new JTable(_model);
_model.addColumn("Time");
_model.addColumn("Recognized names");
_model.addColumn("score");
_scr = new JScrollPane(_table);
this.setContentPane(_scr);
pack();
}
public void addRecord(String[] tab) {
_model.addRow(tab);
}
/**
*
*/
public void clear() {
while (_model.getRowCount() > 0)
_model.removeRow(_model.getRowCount() - 1);
}
} |
Partager