• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help needed in Jtable using AbstractTableModel

 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have predifined my 4 methods in my table class extends AbstractTableModel.
public int getColumnCount()
{
return getFieldInfo().length;
}
public int getRowCount()
{
return getRecordCount();
}
public String getColumnName(int col)
{
return getFieldInfo()[col].getName();
}

public Object getValueAt(int row, int col)
{
this is where i need help. I am having problem in figuring out how to convert my DataInfo[] obtained from criteriaFind() method...my search results...I would like to convert my DataInfo[] results into an Vector and to process the results and return the final values to my table.
}
Thanks alot Lisa.
 
Rudy Yeung
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lisa,
Have you checked what is available inside the data class? You can make use of the getValues() method to obtain an array of string of the record returned.
Rudy
 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rudy I am making progress I took your advice and you are right again with getValues();
Thanks you have been a great help..
If anything this is a real learning experience.
Lisa
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic