View Single Post
  #3 (permalink)  
Old 03-26-2008, 03:44 PM
Bill Bill is offline
Member
 
Join Date: Mar 2008
Posts: 8
Bill is on a distinguished road
Hi,

This is an example of my class:

Code:
public class MyTableModel extends AbstractTableModel{ public MyTableModel(){} public int getRowCount() { return 10; } public int getColumnCount() { return 4; } public Object getValueAt(int row, int col) { return String.valueOf((row+1)) + (col+1); } }
and in my panel:

Code:
//in this table, i want to call a new instance of MyTableModel //to get the model JTable table = new JTable();
I hope this clear

I don't know to do this ! !

thx a lot
Reply With Quote