Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AbstractTableModel

 
joey phillip
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have implemented MytableModel class like this
public class MyTableModel extends AbstractTableModel
{
Vector data = new Vector();
public MyTableModel(String [] header) { ....}
public int getColumnCount(){...}
public Object getValueAt(int row, int col) {
DataInfo dinfo=(DataInfo) data.elementAt(row);
return dinfo.getValues()[col].trim();
}
public void setData(Vector v) {
this.data=v;
}
}
Is it Ok if i use DataInfo inside MyTableModel or it supposed to be more generic.
-joey

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic