GetValue

Hi All

I retreiving resultset from a database and store it in a Vector, I want this Vector to feed a JTable, I implemented getValueAt()

method to return the contents of the vector in the JTable like the following:

public Object getValueAt(int row,int col ){

return results.get( col );

}

but that didn't work, and the first record is repeated for every JTable row.

Any help please?

Jotnarta

Message was edited by:

jotnarta

[679 byte] By [jotnartaa] at [2007-10-3 9:19:26]
# 1
u should update your table model.
Prashant_SDNa at 2007-7-15 4:32:37 > top of Java-index,Desktop,Core GUI APIs...
# 2
am new on this, would please to explain?
jotnartaa at 2007-7-15 4:32:37 > top of Java-index,Desktop,Core GUI APIs...
# 3
Go through with this http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
Prashant_SDNa at 2007-7-15 4:32:37 > top of Java-index,Desktop,Core GUI APIs...
# 4
You have to copy the data from the ResultSet to the TableModel. Check out this posting: http://forum.java.sun.com/thread.jspa?forumID=57&threadID=595582
camickra at 2007-7-15 4:32:37 > top of Java-index,Desktop,Core GUI APIs...