public int getRowCount() { return data.length; } } +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ when i use this model for my JTable as follows:-

public class Table{

public static void main(String args[]) {

//MyTab mt=new MyTab();JTable mt=new JTable(); mt.setModel(new mytabmod());JFrame jf=new JFrame("JTable Extended Demo!"); jf.setLayout(new BorderLayout()); jf.add(mt,BorderLayout.CENTER); jf.setVisible(true); jf.setSize(500,200); } } +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The program executes with out error but the problem is that i am not able to see the columnHeaders ie Name,Sname,Age int he JTable. But i am able to get the values of the data[][] array.

Please let me know where have i gone wrong. And secondly i want to embed the JprogressBar with one of the columns. Pleas e let know how to go about it.

Also use an object oriented approach: Create a Person interface with methods getName, getSecondName, getAge, and use methods like addPerson and getPerson to modify the table data. You could also make your class implement List<Person>.

the AbstractTableModel does some hideous work behind the scene. i too have faced some issues when extending it. Dig in more and you will find. How about going through the source code of AbstractTableModel if you are a curious bug. Else behappy with extending the DefaultTableModel which will anyways sufice for most of your tasks